From: "Paul E. McKenney" <[email protected]> Date: Fri, 29 Mar 2013 12:20:11 -0700
> On Fri, Mar 29, 2013 at 06:01:22AM -0700, Eric Dumazet wrote: >> [PATCH] net: add a synchronize_net() in netdev_rx_handler_unregister() >> >> commit 35d48903e97819 (bonding: fix rx_handler locking) added a race >> in bonding driver, reported by Steven Rostedt who did a very good >> diagnosis : ... >> We can fix bug this in two ways. First is adding a test in >> bond_handle_frame() and others to check if rx_handler_data is NULL. >> >> A second way is adding a synchronize_net() in >> netdev_rx_handler_unregister() to make sure that a rcu protected reader >> has the guarantee to see a non NULL rx_handler_data. >> >> The second way is better as it avoids an extra test in fast path. >> >> Reported-by: Steven Rostedt <[email protected]> >> Signed-off-by: Eric Dumazet <[email protected]> >> Cc: Jiri Pirko <[email protected]> >> Cc: Paul E. McKenney <[email protected]> > > Reviewed-by: Paul E. McKenney <[email protected]> > > With kudos to Steven Rostedt for his analogy between RCU and > Schrödinger's cat. ;-) Applied and queued up for -stable, thanks Everyone. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/

