]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commit - drivers/net/hamradio/bpqether.c
[PATCH] rcu in bpqether driver.
authorRalf Baechle <ralf@linux-mips.org>
Mon, 17 Oct 2005 11:42:32 +0000 (12:42 +0100)
committerJeff Garzik <jgarzik@pobox.com>
Tue, 18 Oct 2005 21:01:27 +0000 (17:01 -0400)
commitbc0a7438605c5e0cafdb32a3caf46254e146b116
tree7331f97459c13f1f4bb18d8d2db6abd724ad6f7f
parentad4ebed00fbf570411edbf6eb6c391e16b71df25
[PATCH] rcu in bpqether driver.

From Suzanne Wood <suzannew@cs.pdx.edu>:

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 <ralf@linux-mips.org>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
drivers/net/hamradio/bpqether.c