netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Joe Damato <jdamato@fastly.com>
To: Stanislav Fomichev <stfomichev@gmail.com>
Cc: Jakub Kicinski <kuba@kernel.org>,
	syzbot <syzbot+846bb38dc67fe62cc733@syzkaller.appspotmail.com>,
	davem@davemloft.net, edumazet@google.com, horms@kernel.org,
	linux-kernel@vger.kernel.org, netdev@vger.kernel.org,
	pabeni@redhat.com, syzkaller-bugs@googlegroups.com
Subject: Re: [syzbot] [net?] possible deadlock in rtnl_newlink
Date: Thu, 29 May 2025 16:54:12 -0700	[thread overview]
Message-ID: <aDjzpDHwcFuGhAqp@LQ3V64L9R2> (raw)
In-Reply-To: <aDiPFiLrhUI0M2MI@mini-arch>

On Thu, May 29, 2025 at 09:45:10AM -0700, Stanislav Fomichev wrote:
> On 05/29, Jakub Kicinski wrote:
> > On Thu, 29 May 2025 08:59:43 -0700 Stanislav Fomichev wrote:
> > > So this is internal WQ entry lock that is being reordered with rtnl
> > > lock. But looking at process_one_work, I don't see actual locks, mostly
> > > lock_map_acquire/lock_map_release calls to enforce some internal WQ
> > > invariants. Not sure what to do with it, will try to read more.
> > 
> > Basically a flush_work() happens while holding rtnl_lock,
> > but the work itself takes that lock. It's a driver bug.
> 
> e400c7444d84 ("e1000: Hold RTNL when e1000_down can be called") ?
> I think similar things (but wrt netdev instance lock) are happening
> with iavf: iavf_remove calls cancel_work_sync while holding the
> instance lock and the work callbacks grab the instance lock as well :-/

I think this is probably the same thread as:

 https://lore.kernel.org/netdev/CAP=Rh=OEsn4y_2LvkO3UtDWurKcGPnZ_NPSXK=FbgygNXL37Sw@mail.gmail.com/

I posted a response there about how to possibly avoid the problem
(based on my rough reading of the driver code), but am still
thinking more on this.

  reply	other threads:[~2025-05-29 23:54 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-29 10:32 [syzbot] [net?] possible deadlock in rtnl_newlink syzbot
2025-05-29 15:59 ` Stanislav Fomichev
2025-05-29 16:10   ` Jakub Kicinski
2025-05-29 16:45     ` Stanislav Fomichev
2025-05-29 23:54       ` Joe Damato [this message]
     [not found] <20250531011248.2445-1-hdanton@sina.com>
2025-05-31  1:33 ` syzbot

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=aDjzpDHwcFuGhAqp@LQ3V64L9R2 \
    --to=jdamato@fastly.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=horms@kernel.org \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=stfomichev@gmail.com \
    --cc=syzbot+846bb38dc67fe62cc733@syzkaller.appspotmail.com \
    --cc=syzkaller-bugs@googlegroups.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).