public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: Dave Jones <davej@codemonkey•org.uk>
To: Cong Wang <xiyou.wangcong@gmail•com>
Cc: Linux Kernel Network Developers <netdev@vger•kernel.org>
Subject: Re: bond: take rcu lock in bond_poll_controller
Date: Fri, 28 Sep 2018 15:49:24 -0400	[thread overview]
Message-ID: <20180928194924.p4enqz3zzcdox7cf@codemonkey.org.uk> (raw)
In-Reply-To: <CAM_iQpUdoyhKKYOgYtMBv__ZX81R9N2Ox-mftP5mTbgb1h=kfg@mail.gmail.com>

On Fri, Sep 28, 2018 at 12:03:22PM -0700, Cong Wang wrote:
 > On Fri, Sep 28, 2018 at 12:02 PM Cong Wang <xiyou.wangcong@gmail•com> wrote:
 > >
 > > On Fri, Sep 28, 2018 at 11:26 AM Dave Jones <davej@codemonkey•org.uk> wrote:
 > > > diff --git a/net/core/netpoll.c b/net/core/netpoll.c
 > > > index 3219a2932463..4f9494381635 100644
 > > > --- a/net/core/netpoll.c
 > > > +++ b/net/core/netpoll.c
 > > > @@ -330,6 +330,7 @@ void netpoll_send_skb_on_dev(struct netpoll *np, struct sk_buff *skb,
 > > >         /* It is up to the caller to keep npinfo alive. */
 > > >         struct netpoll_info *npinfo;
 > > >
 > > > +       rcu_read_lock();
 > > >         lockdep_assert_irqs_disabled();
 > > >
 > > >         npinfo = rcu_dereference_bh(np->dev->npinfo);
 > >
 > > I think you probably need rcu_read_lock_bh() to satisfy
 > > rcu_deference_bh()...
 > 
 > But irq is disabled here, so not sure if rcu_read_lock_bh()
 > could cause trouble... Interesting...

I was wondering for a moment why I never got a warning, then I
remembered I disabled lockdep for that machine because nfs spews stuff.

I'll doublecheck, and post v4. lol, this looked like a 2 minute fix at first.

	Dave

  reply	other threads:[~2018-09-29  2:14 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-24 19:23 bond: take rcu lock in bond_poll_controller Dave Jones
2018-09-25 21:18 ` Cong Wang
2018-09-27  3:15 ` David Miller
2018-09-28 16:16   ` Dave Jones
2018-09-28 16:55     ` Cong Wang
2018-09-28 17:25       ` Dave Jones
2018-09-28 17:31         ` Cong Wang
2018-09-28 18:21           ` Dave Jones
2018-09-28 18:24     ` Dave Jones
2018-09-28 18:38       ` Eric Dumazet
2018-09-28 19:02       ` Cong Wang
2018-09-28 19:03         ` Cong Wang
2018-09-28 19:49           ` Dave Jones [this message]
2018-09-28 20:26 ` bond: take rcu lock in netpoll_send_skb_on_dev Dave Jones
2018-10-02  6:26   ` David Miller
2018-10-15 11:36   ` Eran Ben Elisha
2018-10-18  5:46     ` Cong Wang
2018-10-18  8:40       ` Eran Ben Elisha

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=20180928194924.p4enqz3zzcdox7cf@codemonkey.org.uk \
    --to=davej@codemonkey$(echo .)org.uk \
    --cc=netdev@vger$(echo .)kernel.org \
    --cc=xiyou.wangcong@gmail$(echo .)com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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