Linux USB
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Hsin-Te Yuan" <yuanhsinte@chromium.org>
Cc: linux-usb@vger.kernel.org
Subject: Re: [PATCH net] r8152: do not (un)register the PM notifier under RTNL
Date: Mon, 23 Nov 2026 12:38:55 +0000	[thread overview]
Message-ID: <sashiko-outbox-229238@kernel.org> (raw)
In-Reply-To: <20261123-r8152-pm-notifier-rtnl-v1-1-31e011a2ee51@google.com>

> If an r8152 Ethernet adapter is plugged or unplugged as a device goes to
> sleep, the suspend attempt and every task waiting on RTNL can deadlock,
> leaving the device unable to wake up.
> 
> In commit 5ee3c60c8d3b ("r8152: fix the wake event"),
> register_pm_notifier() and unregister_pm_notifier() were added to
> rtl8152_open() and rtl8152_close(), the .ndo_open and .ndo_stop handlers,
> which run under RTNL and take the PM notifier chain rwsem
> (pm_chain_head.rwsem) for writing. During suspend or hibernation, the PM
> core holds that rwsem for reading while calling wg_pm_notification()
> (registered in wg_device_init()), which takes rtnl_lock() unless
> CONFIG_PM_AUTOSLEEP or CONFIG_PM_USERSPACE_AUTOSLEEP is enabled:
> 
>   Task A (open or close)            Task B (suspend or hibernate)
>   rtnl_lock()                       down_read(&pm_chain_head.rwsem)
> [ ... ]
> also resumes an autosuspended adapter whose interface is down, which
> rtl8152_runtime_resume() handles.
> 
> Fixes: 5ee3c60c8d3b ("r8152: fix the wake event")
> Signed-off-by: Hsin-Te Yuan <yuanhsinte@google.com>

Sashiko has reviewed this patch and found no issues.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261123-r8152-pm-notifier-rtnl-v1-1-31e011a2ee51@google.com?part=1

      parent reply	other threads:[~2026-11-23 12:38 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-23 12:29 [PATCH net] r8152: do not (un)register the PM notifier under RTNL Hsin-Te Yuan
2026-11-23 12:32 ` netdev-bot+sinfo
2026-11-23 12:38 ` sashiko-bot [this message]

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=sashiko-outbox-229238@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    --cc=yuanhsinte@chromium.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox