From: Stephen Hemminger <shemminger@osdl.org>
To: Stephen Hemminger <shemminger@osdl.org>
Cc: "David S. Miller" <davem@redhat.com>,
Joerg Reuter <jreuter@yaina.de>,
linux-hams@vger.kernel.org, netdev@oss.sgi.com
Subject: [PATCH] bpqether add rcu_read_lock
Date: Tue, 12 Aug 2003 15:33:12 -0700 [thread overview]
Message-ID: <20030812153312.0e762cf3.shemminger@osdl.org> (raw)
In-Reply-To: <20030811162205.78b2029f.shemminger@osdl.org>
Fix one comment and add rcu_read_lock/rcu_read_unlock in the net_device_notifier.
Preemption is almost certainly already disabled there, but be safe.
diff -Nru a/drivers/net/hamradio/bpqether.c b/drivers/net/hamradio/bpqether.c
--- a/drivers/net/hamradio/bpqether.c Tue Aug 12 11:37:28 2003
+++ b/drivers/net/hamradio/bpqether.c Tue Aug 12 11:37:28 2003
@@ -141,7 +141,6 @@
/*
* Get the BPQ device for the ethernet device
- * need to hold bqp_lock at least for read
*/
static inline struct net_device *bpq_get_ax25_dev(struct net_device *dev)
{
@@ -564,6 +563,8 @@
if (!dev_is_ethdev(dev))
return NOTIFY_DONE;
+ rcu_read_lock();
+
switch (event) {
case NETDEV_UP: /* new ethernet device -> new BPQ interface */
if (bpq_get_ax25_dev(dev) == NULL)
@@ -582,6 +583,7 @@
default:
break;
}
+ rcu_read_unlock();
return NOTIFY_DONE;
}
next prev parent reply other threads:[~2003-08-12 22:33 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-08-11 23:22 [PATCH] Update bpqether for 2.6 Stephen Hemminger
2003-08-12 5:48 ` David S. Miller
2003-08-12 22:33 ` Stephen Hemminger [this message]
2003-08-13 10:56 ` [PATCH] bpqether add rcu_read_lock David S. Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20030812153312.0e762cf3.shemminger@osdl.org \
--to=shemminger@osdl.org \
--cc=davem@redhat.com \
--cc=jreuter@yaina.de \
--cc=linux-hams@vger.kernel.org \
--cc=netdev@oss.sgi.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).