summaryrefslogtreecommitdiff
path: root/kexec/ifdown.c
AgeCommit message (Collapse)Author
2019-10-03kexec-tools: Fix possible out-of-bounds access in ifdownHelge Deller
Fix a possible out-of-bounds access in function ifdown(): ifdown.c: In function 'ifdown': ifdown.c:56:4: warning: 'strncpy' specified bound 16 equals destination size [-Wstringop-truncation] 56 | strncpy(ifr.ifr_name, ifp->if_name, IFNAMSIZ); Signed-off-by: Helge Deller <deller@gmx.de> Signed-off-by: Simon Horman <horms@verge.net.au>
2016-09-29kexec: socket not released when error situation occur.YoungHyun Yoo
Fix resourceleek in ifdown function when error occur. Signed-off-by: YoungHyun Yoo <yooyoo.yoo@samsung.com> Signed-off-by: Simon Horman <horms@verge.net.au>
2011-08-09kexec-tools: include minor klibc portingmaximilian attems
These 2 "uncommon" include pathes are the first stumbling blocks to build kexec-tools against klibc. Of course more is needed, but this is a first step. On the klibc step there is still stuff needed, but it is already possible with hacks as Oppenembedded shows. Signed-off-by: maximilian attems <max@stro.at> Signed-off-by: Simon Horman <horms@verge.net.au>
2011-01-13ifdown: really set down all active interfacesLeonardo Chiquitto
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>
2006-07-27kexec-tools-1.101Eric W. Biederman
- Initial import into git - initial nbi image formage support - ppc32 initial register setting fixes. - gzipped multiboot file support