From: Jay Vosburgh Date: Tue, 19 Jun 2007 18:12:12 +0000 (-0700) Subject: bonding: Fix use after free in unregister path X-Git-Tag: v2.6.22-rc6~62 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3201e656ce56ed02e9501906c18ffe16ae350a52;p=pandora-kernel.git bonding: Fix use after free in unregister path The following patch (based on a patch from Stephen Hemminger ) removes use after free conditions in the unregister path for the bonding master. Without this patch, an operation of the form "echo -bond0 > /sys/class/net/bonding_masters" would trigger a NULL pointer dereference in sysfs. I was not able to induce the failure with the non-sysfs code path, but for consistency I updated that code as well. I also did some testing of the bonding /proc file being open while the bond is being deleted, and didn't see any problems there. Signed-off-by: Jay Vosburgh Signed-off-by: Jeff Garzik --- Reading git-diff-tree failed