public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Hangbin Liu <liuhangbin@gmail.com>
To: Vladimir Oltean <vladimir.oltean@nxp.com>,
	Jay Vosburgh <j.vosburgh@gmail.com>
Cc: Veaceslav Falico <vfalico@gmail.com>,
	Andy Gospodarek <andy@greyhouse.net>,
	netdev@vger.kernel.org, pabeni@redhat.com,
	"David S. Miller" <davem@davemloft.net>,
	Jakub Kicinski <kuba@kernel.org>,
	syzkaller-bugs@googlegroups.com,
	syzbot <syzbot+92beb3d46aab498710fa@syzkaller.appspotmail.com>
Subject: Re: [syzbot] WARNING: suspicious RCU usage in bond_ethtool_get_ts_info
Date: Fri, 13 May 2022 09:51:34 +0800	[thread overview]
Message-ID: <Yn25ppe3XtdsxJt+@Laptop-X1> (raw)
In-Reply-To: <000000000000fd857805ded5a88e@google.com>

Remove bpf guys from cc list.

On Thu, May 12, 2022 at 12:35:28PM -0700, syzbot wrote:
> 
> The issue was bisected to:
> 
> commit aa6034678e873db8bd5c5a4b73f8b88c469374d6
> Author: Hangbin Liu <liuhangbin@gmail.com>
> Date:   Fri Jan 21 08:25:18 2022 +0000
> 
>     bonding: use rcu_dereference_rtnl when get bonding active slave
> 
> bisection log:  https://syzkaller.appspot.com/x/bisect.txt?x=16fce349f00000
> final oops:     https://syzkaller.appspot.com/x/report.txt?x=15fce349f00000
> console output: https://syzkaller.appspot.com/x/log.txt?x=11fce349f00000
> 
> IMPORTANT: if you fix the issue, please add the following tag to the commit:
> Reported-by: syzbot+92beb3d46aab498710fa@syzkaller.appspotmail.com
> Fixes: aa6034678e87 ("bonding: use rcu_dereference_rtnl when get bonding active slave")
> 
> =============================
> WARNING: suspicious RCU usage
> 5.18.0-rc5-syzkaller-01392-g01f4685797a5 #0 Not tainted
> -----------------------------
> include/net/bonding.h:353 suspicious rcu_dereference_check() usage!
> 
> other info that might help us debug this:
> 
> 
> rcu_scheduler_active = 2, debug_locks = 1
> 1 lock held by syz-executor317/3599:
>  #0: ffff88801de78130 (sk_lock-AF_INET){+.+.}-{0:0}, at: lock_sock include/net/sock.h:1680 [inline]
>  #0: ffff88801de78130 (sk_lock-AF_INET){+.+.}-{0:0}, at: sock_setsockopt+0x1e3/0x2ec0 net/core/sock.c:1066
> 
> stack backtrace:
> CPU: 0 PID: 3599 Comm: syz-executor317 Not tainted 5.18.0-rc5-syzkaller-01392-g01f4685797a5 #0
> Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
> Call Trace:
>  <TASK>
>  __dump_stack lib/dump_stack.c:88 [inline]
>  dump_stack_lvl+0xcd/0x134 lib/dump_stack.c:106
>  bond_option_active_slave_get_rcu include/net/bonding.h:353 [inline]
>  bond_ethtool_get_ts_info+0x32c/0x3a0 drivers/net/bonding/bond_main.c:5595
>  __ethtool_get_ts_info+0x173/0x240 net/ethtool/common.c:554
>  ethtool_get_phc_vclocks+0x99/0x110 net/ethtool/common.c:568
>  sock_timestamping_bind_phc net/core/sock.c:869 [inline]
>  sock_set_timestamping+0x3a3/0x7e0 net/core/sock.c:916
>  sock_setsockopt+0x543/0x2ec0 net/core/sock.c:1221

Oh, I forgot to check setsockopt path...

Hi Vladimir, Jay,

Do you think if I should revert my previous commit, or just add
rcu_read_lock()/rcu_read_unlock() back to bond_ethtool_get_ts_info()?

Thanks
Hangbin

  reply	other threads:[~2022-05-13  1:51 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-12 19:35 [syzbot] WARNING: suspicious RCU usage in bond_ethtool_get_ts_info syzbot
2022-05-13  1:51 ` Hangbin Liu [this message]
2022-05-13  8:48   ` Vladimir Oltean

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=Yn25ppe3XtdsxJt+@Laptop-X1 \
    --to=liuhangbin@gmail.com \
    --cc=andy@greyhouse.net \
    --cc=davem@davemloft.net \
    --cc=j.vosburgh@gmail.com \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=syzbot+92beb3d46aab498710fa@syzkaller.appspotmail.com \
    --cc=syzkaller-bugs@googlegroups.com \
    --cc=vfalico@gmail.com \
    --cc=vladimir.oltean@nxp.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