diff options
author | Leonardo Chiquitto <leonardo.lists@gmail.com> | 2011-01-10 09:19:15 -0200 |
---|---|---|
committer | Simon Horman <horms@verge.net.au> | 2011-01-13 16:39:31 +0900 |
commit | c75354b291d1c8cc306d02a63372d487299188b3 (patch) | |
tree | 6ee64d95177438897433246d1bf6f3ab350b2cdc /purgatory | |
parent | 9cbef39baac3b18ad0d7dde9a646c1ffb24817a8 (diff) |
ifdown: really set down all active interfaces
Hello,
We've got a bug report of random memory corruption when using kexec.
The test case to reproduce the problem sets up bonding between two
tg3 NICs and transmits some data just before calling kexec to boot
the new kernel. Around one in every one hundred boots would crash
early with different signatures.
We confirmed that the patch below resolves the problem. Please, could
you review and consider it for upstream inclusion?
Thanks,
Leonardo
Before executing the new kernel, kexec disables all network interfaces
to prevent problems like random memory corruption caused by in flight
DMAs.
The current algorithm uses the SIOCGIFCONF to enumerate all interfaces
before shutting them down. However, this ioctl returns only the interfaces
that have an IP address set. This means that in some setups, kexec may
skip interfaces that are up and running. A common example is in bonding,
where the enslaved interfaces are up but may not have an IP address
configured.
This patch replaces SIOCGIFCONF with if_nameindex() to enumerate all
network interfaces available, regardless of having an IP address set
or not.
Signed-off-by: Leonardo Chiquitto <lchiquitto@novell.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
Diffstat (limited to 'purgatory')
0 files changed, 0 insertions, 0 deletions