All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: Heiner Kallweit <hkallweit1@gmail.com>
Cc: David Miller <davem@davemloft.net>,
	Jesse Brandeburg <jesse.brandeburg@intel.com>,
	Tony Nguyen <anthony.l.nguyen@intel.com>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	intel-wired-lan <intel-wired-lan@lists.osuosl.org>
Subject: Re: [PATCH net] igb: fix deadlock caused by taking RTNL in RPM resume path
Date: Tue, 30 Nov 2021 09:12:06 -0800	[thread overview]
Message-ID: <20211130091206.488a541f@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> (raw)
In-Reply-To: <6edc23a1-5907-3a41-7b46-8d53c5664a56@gmail.com>

On Tue, 30 Nov 2021 07:46:22 +0100 Heiner Kallweit wrote:
> On 30.11.2021 02:17, Jakub Kicinski wrote:
> > On Mon, 29 Nov 2021 22:14:06 +0100 Heiner Kallweit wrote:  
> >> -	rtnl_lock();
> >> +	if (!rpm)
> >> +		rtnl_lock();  
> > 
> > Is there an ASSERT_RTNL() hidden in any of the below? Can we add one?
> > Unless we're 100% confident nobody will RPM resume without rtnl held..
> >   
> 
> Not sure whether igb uses RPM the same way as r8169. There the device
> is runtime-suspended (D3hot) w/o link. Once cable is plugged in the PHY
> triggers a PME, and PCI core runtime-resumes the device (MAC).
> In this case RTNL isn't held by the caller. Therefore I don't think
> it's safe to assume that all callers hold RTNL.

No, no - I meant to leave the locking in but add ASSERT_RTNL() to catch
if rpm == true && rtnl_held() == false.

WARNING: multiple messages have this Message-ID (diff)
From: Jakub Kicinski <kuba@kernel.org>
To: intel-wired-lan@osuosl.org
Subject: [Intel-wired-lan] [PATCH net] igb: fix deadlock caused by taking RTNL in RPM resume path
Date: Tue, 30 Nov 2021 09:12:06 -0800	[thread overview]
Message-ID: <20211130091206.488a541f@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> (raw)
In-Reply-To: <6edc23a1-5907-3a41-7b46-8d53c5664a56@gmail.com>

On Tue, 30 Nov 2021 07:46:22 +0100 Heiner Kallweit wrote:
> On 30.11.2021 02:17, Jakub Kicinski wrote:
> > On Mon, 29 Nov 2021 22:14:06 +0100 Heiner Kallweit wrote:  
> >> -	rtnl_lock();
> >> +	if (!rpm)
> >> +		rtnl_lock();  
> > 
> > Is there an ASSERT_RTNL() hidden in any of the below? Can we add one?
> > Unless we're 100% confident nobody will RPM resume without rtnl held..
> >   
> 
> Not sure whether igb uses RPM the same way as r8169. There the device
> is runtime-suspended (D3hot) w/o link. Once cable is plugged in the PHY
> triggers a PME, and PCI core runtime-resumes the device (MAC).
> In this case RTNL isn't held by the caller. Therefore I don't think
> it's safe to assume that all callers hold RTNL.

No, no - I meant to leave the locking in but add ASSERT_RTNL() to catch
if rpm == true && rtnl_held() == false.

  reply	other threads:[~2021-11-30 17:12 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-29 21:14 [PATCH net] igb: fix deadlock caused by taking RTNL in RPM resume path Heiner Kallweit
2021-11-29 21:14 ` [Intel-wired-lan] " Heiner Kallweit
2021-11-29 23:09 ` Stephen Hemminger
2021-11-29 23:09   ` [Intel-wired-lan] " Stephen Hemminger
2021-11-30  6:33   ` Heiner Kallweit
2021-11-30  6:33     ` [Intel-wired-lan] " Heiner Kallweit
2021-11-30  1:17 ` Jakub Kicinski
2021-11-30  1:17   ` [Intel-wired-lan] " Jakub Kicinski
2021-11-30  6:46   ` Heiner Kallweit
2021-11-30  6:46     ` [Intel-wired-lan] " Heiner Kallweit
2021-11-30 17:12     ` Jakub Kicinski [this message]
2021-11-30 17:12       ` Jakub Kicinski
2021-11-30 21:35       ` Heiner Kallweit
2021-11-30 21:35         ` [Intel-wired-lan] " Heiner Kallweit
2021-12-01  0:51         ` Jakub Kicinski
2021-12-01  0:51           ` [Intel-wired-lan] " Jakub Kicinski
2021-12-19  8:31 ` Thorsten Leemhuis
2021-12-19  8:31   ` [Intel-wired-lan] " Thorsten Leemhuis
2021-12-20 19:56   ` Nguyen, Anthony L
2021-12-20 19:56     ` [Intel-wired-lan] " Nguyen, Anthony L
2021-12-22  5:17     ` Thorsten Leemhuis
2021-12-22  5:17       ` [Intel-wired-lan] " Thorsten Leemhuis
2021-12-22 12:50       ` Thorsten Leemhuis
2021-12-22 12:50         ` [Intel-wired-lan] " Thorsten Leemhuis

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=20211130091206.488a541f@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com \
    --to=kuba@kernel.org \
    --cc=anthony.l.nguyen@intel.com \
    --cc=davem@davemloft.net \
    --cc=hkallweit1@gmail.com \
    --cc=intel-wired-lan@lists.osuosl.org \
    --cc=jesse.brandeburg@intel.com \
    --cc=netdev@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.