From: Johannes Berg <johannes@sipsolutions.net>
To: Stephen Hemminger <shemminger@vyatta.com>
Cc: paulmck@linux.vnet.ibm.com, netdev <netdev@vger.kernel.org>
Subject: Re: br_forward.c - rcu dereference warning
Date: Tue, 27 Jul 2010 22:14:39 +0200 [thread overview]
Message-ID: <1280261679.3755.6.camel@jlt3.sipsolutions.net> (raw)
In-Reply-To: <20100727112630.5a5ce84b@nehalam>
On Tue, 2010-07-27 at 11:26 -0700, Stephen Hemminger wrote:
> -/* net device transmit always called with no BH (preempt_disabled) */
> +/* net device transmit always called with no BH disabled */
"no BH disabled"?
> @@ -48,6 +48,7 @@ netdev_tx_t br_dev_xmit(struct sk_buff *
> skb_reset_mac_header(skb);
> skb_pull(skb, ETH_HLEN);
>
> + rcu_read_lock();
> if (is_multicast_ether_addr(dest)) {
> if (unlikely(netpoll_tx_running(dev))) {
> br_flood_deliver(br, skb);
> @@ -67,6 +68,7 @@ netdev_tx_t br_dev_xmit(struct sk_buff *
> br_flood_deliver(br, skb);
>
> out:
> + rcu_read_unlock();
> return NETDEV_TX_OK;
> }
>
> --- a/net/bridge/br_fdb.c 2010-07-27 11:18:30.815320981 -0700
> +++ b/net/bridge/br_fdb.c 2010-07-27 11:18:59.597710975 -0700
> @@ -214,7 +214,7 @@ void br_fdb_delete_by_port(struct net_br
> spin_unlock_bh(&br->hash_lock);
> }
>
> -/* No locking or refcounting, assumes caller has no preempt (rcu_read_lock) */
> +/* No locking or refcounting, assumes caller has rcu_read_lock */
> struct net_bridge_fdb_entry *__br_fdb_get(struct net_bridge *br,
> const unsigned char *addr)
> {
> --- a/net/bridge/br_input.c 2010-07-27 11:19:05.266181492 -0700
> +++ b/net/bridge/br_input.c 2010-07-27 11:19:29.148163149 -0700
> @@ -39,7 +39,7 @@ static int br_pass_frame_up(struct sk_bu
> netif_receive_skb);
> }
>
> -/* note: already called with rcu_read_lock (preempt_disabled) */
> +/* note: already called with rcu_read_lock */
> int br_handle_frame_finish(struct sk_buff *skb)
> {
> const unsigned char *dest = eth_hdr(skb)->h_dest;
> @@ -110,7 +110,7 @@ drop:
> goto out;
> }
>
> -/* note: already called with rcu_read_lock (preempt_disabled) */
> +/* note: already called with rcu_read_lock */
> static int br_handle_local_finish(struct sk_buff *skb)
> {
> struct net_bridge_port *p = br_port_get_rcu(skb->dev);
> @@ -133,8 +133,7 @@ static inline int is_link_local(const un
>
> /*
> * Return NULL if skb is handled
> - * note: already called with rcu_read_lock (preempt_disabled) from
> - * netif_receive_skb
> + * note: already called with rcu_read_lock from netif_receive_skb
> */
> struct sk_buff *br_handle_frame(struct sk_buff *skb)
> {
> --- a/net/bridge/br_stp_bpdu.c 2010-07-27 11:19:34.092573294 -0700
> +++ b/net/bridge/br_stp_bpdu.c 2010-07-27 11:19:40.725123403 -0700
> @@ -131,7 +131,7 @@ void br_send_tcn_bpdu(struct net_bridge_
> /*
> * Called from llc.
> *
> - * NO locks, but rcu_read_lock (preempt_disabled)
> + * NO locks, but rcu_read_lock
> */
> void br_stp_rcv(const struct stp_proto *proto, struct sk_buff *skb,
> struct net_device *dev)
>
Did you want me to test the patch?
johannes
next prev parent reply other threads:[~2010-07-27 20:14 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-27 10:45 br_forward.c - rcu dereference warning Johannes Berg
2010-07-27 12:38 ` Paul E. McKenney
2010-07-27 18:26 ` Stephen Hemminger
2010-07-27 20:14 ` Johannes Berg [this message]
2010-07-27 20:42 ` Stephen Hemminger
2010-07-28 6:48 ` Johannes Berg
2010-07-28 7:33 ` Johannes Berg
2010-07-28 16:57 ` [PATCH] bridge: add rcu_read_lock Stephen Hemminger
2010-07-28 17:52 ` David Miller
2010-07-28 18:01 ` Stephen Hemminger
2010-07-28 17:39 ` br_forward.c - rcu dereference warning David 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=1280261679.3755.6.camel@jlt3.sipsolutions.net \
--to=johannes@sipsolutions.net \
--cc=netdev@vger.kernel.org \
--cc=paulmck@linux.vnet.ibm.com \
--cc=shemminger@vyatta.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).