public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Cong Wang <xiyou.wangcong@gmail.com>
To: "D. Wythe" <alibuda@linux.alibaba.com>
Cc: netdev@vger.kernel.org, Cong Wang <cong.wang@bytedance.com>,
	syzbot+c75d1de73d3b8b76272f@syzkaller.appspotmail.com,
	Wenjia Zhang <wenjia@linux.ibm.com>,
	Jan Karcher <jaka@linux.ibm.com>,
	Tony Lu <tonylu@linux.alibaba.com>,
	Wen Gu <guwen@linux.alibaba.com>
Subject: Re: [Patch net] smc: use RCU version of lower netdev searching
Date: Fri, 13 Sep 2024 20:32:15 -0700	[thread overview]
Message-ID: <ZuUDv8PLR4FHg+oC@pop-os.localdomain> (raw)
In-Reply-To: <e0842025-5e21-4755-8e60-1832e9cfe672@linux.alibaba.com>

On Sat, Sep 14, 2024 at 10:28:15AM +0800, D. Wythe wrote:
> 
> 
> On 9/14/24 8:53 AM, Cong Wang wrote:
> > On Thu, Sep 12, 2024 at 02:20:47PM +0800, D. Wythe wrote:
> > > 
> > > 
> > > On 9/12/24 8:04 AM, Cong Wang wrote:
> > > > From: Cong Wang <cong.wang@bytedance.com>
> > > > 
> > > > Both netdev_walk_all_lower_dev() and netdev_lower_get_next() have a
> > > > RCU version, which are netdev_walk_all_lower_dev_rcu() and
> > > > netdev_next_lower_dev_rcu(). Switching to the RCU version would
> > > > eliminate the need for RTL lock, thus could amend the deadlock
> > > > complaints from syzbot. And it could also potentially speed up its
> > > > callers like smc_connect().
> > > > 
> > > > Reported-by: syzbot+c75d1de73d3b8b76272f@syzkaller.appspotmail.com
> > > > Closes: https://syzkaller.appspot.com/bug?extid=c75d1de73d3b8b76272f
> > > > Cc: Wenjia Zhang <wenjia@linux.ibm.com>
> > > > Cc: Jan Karcher <jaka@linux.ibm.com>
> > > > Cc: "D. Wythe" <alibuda@linux.alibaba.com>
> > > > Cc: Tony Lu <tonylu@linux.alibaba.com>
> > > > Cc: Wen Gu <guwen@linux.alibaba.com>
> > > > Signed-off-by: Cong Wang <cong.wang@bytedance.com>
> > > 
> > > 
> > > Haven't looked at your code yet, but the issue you fixed doesn't exist.
> > > The real reason is that we lacks some lockdep annotations for
> > > IPPROTO_SMC.
> > 
> > If you look at the code, it is not about sock lock annotations, it is
> > about RTNL lock which of course has annotations.
> > 
> 
> If so, please explain the deadlock issue mentioned in sysbot and
> how it triggers deadlocks.

Sure, but what questions do you have here? To me, the lockdep output is
self-explained. Please kindly let me know if you have any troubles
understanding it, I am always happy to help.

Thanks.

  reply	other threads:[~2024-09-14  3:32 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-12  0:04 [Patch net] smc: use RCU version of lower netdev searching Cong Wang
2024-09-12  6:20 ` D. Wythe
2024-09-14  0:53   ` Cong Wang
2024-09-14  2:28     ` D. Wythe
2024-09-14  3:32       ` Cong Wang [this message]
2024-09-18  2:23         ` D. Wythe
2024-09-19  9:30           ` Paolo Abeni
2024-09-19 15:46             ` D. Wythe
2024-09-23  8:16               ` Wenjia Zhang
2024-09-23 15:48 ` ericnetdev dumazet

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=ZuUDv8PLR4FHg+oC@pop-os.localdomain \
    --to=xiyou.wangcong@gmail.com \
    --cc=alibuda@linux.alibaba.com \
    --cc=cong.wang@bytedance.com \
    --cc=guwen@linux.alibaba.com \
    --cc=jaka@linux.ibm.com \
    --cc=netdev@vger.kernel.org \
    --cc=syzbot+c75d1de73d3b8b76272f@syzkaller.appspotmail.com \
    --cc=tonylu@linux.alibaba.com \
    --cc=wenjia@linux.ibm.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