From: Ralf Baechle Date: Mon, 17 Oct 2005 11:42:32 +0000 (+0100) Subject: [PATCH] rcu in bpqether driver. X-Git-Tag: v2.6.15-rc1~733^2~1^2~40 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bc0a7438605c5e0cafdb32a3caf46254e146b116;p=pandora-kernel.git [PATCH] rcu in bpqether driver. From Suzanne Wood : Clarify RCU implementation in bpqether.c. Because bpq_new_device() calls list_add_rcu() and bpq_free_device() calls list_del_rcu(), substitute list_for_each_entry_rcu() for list_for_each_entry() in bpq_get_ax25_dev() and in bpq_seq_start(). Add rcu dereference protection in bpq_seq_next(). The rcu_read_lock()/unlock() in bpq_device_event() are removed because netdev event handlers are called with RTNL locking in place. FYI: bpq_free_device() calls list_del_rcu() which, per list.h, requires synchronize_rcu() which can block or call_rcu() or call_rcu_bh() which cannot block. Herbert Xu notes that synchronization is done here by unregister_netdevice(). This calls synchronize_net() which in turn uses synchronize_rcu(). Signed-off-by: Ralf Baechle DL5RB Signed-off-by: Jeff Garzik --- Reading git-diff-tree failed