From: nikolay@redhat.com Date: Sat, 6 Apr 2013 00:54:38 +0000 (+0000) Subject: bonding: fix bonding_masters race condition in bond unloading X-Git-Tag: v3.2.45~30 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=12f7b44dbf5cfc5bfd4db7ce03998dbc5adf7d38;p=pandora-kernel.git bonding: fix bonding_masters race condition in bond unloading [ Upstream commit 69b0216ac255f523556fa3d4ff030d857eaaa37f ] While the bonding module is unloading, it is considered that after rtnl_link_unregister all bond devices are destroyed but since no synchronization mechanism exists, a new bond device can be created via bonding_masters before unregister_pernet_subsys which would lead to multiple problems (e.g. NULL pointer dereference, wrong RIP, list corruption). This patch fixes the issue by removing any bond devices left in the netns after bonding_masters is removed from sysfs. Signed-off-by: Nikolay Aleksandrov Acked-by: Veaceslav Falico Signed-off-by: David S. Miller Signed-off-by: Ben Hutchings --- Reading git-diff-tree failed