]> git.baikalelectronics.ru Git - kernel.git/commit
bonding: use rcu_dereference() to access curr_active_slave
authordingtianhong <dingtianhong@huawei.com>
Fri, 21 Feb 2014 08:08:53 +0000 (16:08 +0800)
committerDavid S. Miller <davem@davemloft.net>
Mon, 24 Feb 2014 23:28:23 +0000 (18:28 -0500)
commitb44bdbccd2816e86a1f02696959f9eccd31ed7c1
tree609b8f5f80fe2d3c5d115c3885ed5d51193c40f2
parenta09e5bb24ba637e4120f1ac4621f1b1887cb5cf0
bonding: use rcu_dereference() to access curr_active_slave

The bond_info_show_master already in RCU read-side critical section,
and the we access curr_active_slave without the curr_slave_lock, we
could not sure whether the curr_active_slave will be changed during
the processing, so use RCU to protected the pointer.

Cc: Jay Vosburgh <fubar@us.ibm.com>
Cc: Veaceslav Falico <vfalico@redhat.com>
Cc: Andy Gospodarek <andy@greyhouse.net>
Signed-off-by: Ding Tianhong <dingtianhong@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/bonding/bond_procfs.c