This is a note to let you know that I've just added the patch titled bonding: fix race condition in bonding_store_slaves_active
to the 3.4-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: bonding-fix-race-condition-in-bonding_store_slaves_active.patch and it can be found in the queue-3.4 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@vger.kernel.org> know about it. >From b9be04947edf4c74a81ae9040e33a624d66620d3 Mon Sep 17 00:00:00 2001 From: "niko...@redhat.com" <niko...@redhat.com> Date: Thu, 29 Nov 2012 01:37:59 +0000 Subject: bonding: fix race condition in bonding_store_slaves_active From: "niko...@redhat.com" <niko...@redhat.com> [ Upstream commit e196c0e579902f42cf72414461fb034e5a1ffbf7 ] Race between bonding_store_slaves_active() and slave manipulation functions. The bond_for_each_slave use in bonding_store_slaves_active() is not protected by any synchronization mechanism. NULL pointer dereference is easy to reach. Fixed by acquiring the bond->lock for the slave walk. v2: Make description text < 75 columns Signed-off-by: Nikolay Aleksandrov <niko...@redhat.com> Signed-off-by: Jay Vosburgh <fu...@us.ibm.com> Signed-off-by: David S. Miller <da...@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gre...@linuxfoundation.org> --- drivers/net/bonding/bond_sysfs.c | 2 ++ 1 file changed, 2 insertions(+) --- a/drivers/net/bonding/bond_sysfs.c +++ b/drivers/net/bonding/bond_sysfs.c @@ -1578,6 +1578,7 @@ static ssize_t bonding_store_slaves_acti goto out; } + read_lock(&bond->lock); bond_for_each_slave(bond, slave, i) { if (!bond_is_active_slave(slave)) { if (new_value) @@ -1586,6 +1587,7 @@ static ssize_t bonding_store_slaves_acti slave->inactive = 1; } } + read_unlock(&bond->lock); out: return ret; } Patches currently in stable-queue which might be from niko...@redhat.com are queue-3.4/bonding-fix-race-condition-in-bonding_store_slaves_active.patch -- To unsubscribe from this list: send the line "unsubscribe stable" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html