From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796136969; b=td5WC/+WCdTwsqtDqLDcWR8RO9lRK94pD6avPDP3CWOION7ByEe9abV7PCkXT8G8sw0R fNaGrfGnmREUzLYOIaP+CSytDqPG9Z8ytqzNwAVQMXffb67nbUMx9h5SdR0WPQ0IoJG7s wxXIRbiKmdNk80zqfh7dZ1k9GO6zHSsL5iWl9k5JdCMAIqBJ1RhenRiluQWdJq9n6JZ9G RlbkoAyUXxdQ0nJjlmRm3bTiFDM7cq7xSpIgwuj78No5WFZMhLI5RIVZc9MQJEvD/B/nQ 6BBh81eC7RK4jzcH9IVThnKKXNPpNGjxOwSvQqgNaEw5LLZ54VT5I9i0A2lHnRjPeTg== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796136969; h=Received:DKIM-Signature:Message-ID:From:Subject:Reply-To:To:Cc: In-Reply-To:References:Content-Type:Content-Transfer-Encoding:Date; bh=J5phno8CPG7YUWA+n+D+7VFt3J/ydrlsqS5Y899COuo=; b=QTk+IlNLpr50luSo8i7ByeJogoyEN8wm9Ol13L1pm0p9hqIt8NOaa7xEZs52VHV2k/Oj oOV49XYCMwYW3bKW0HcS3aIll3g8USs+ZNtjjBpXjv2RR9O0EUR/OcRVrTI8ITUjpPQdD kCg4E83/PO+ZvTeVua/nx7MOTKjQged5P+WTiJGUuLoknR7PVNMJgm6ARMts2rC/qJeiQ pvyrsWODbT/W+Ol2qtBQxvjsHxFl3RRQKApw9zH4IOd3fPG+LcMxBbegixriQYyRZp1lL 5vOcOxrTpAp2pHpxKS2dWoW/z3KR0Z2fSmbLD84qQ81hzd6vjZukmdfwMlK4g4iN3eQ== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=g18v8y8O; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5B6F8606A31A for ; Tue, 1 Dec 2026 14:56:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=g18v8y8O Received: by smtp.kernel.org (Postfix) with ESMTPSA id D0E1A1F00897; Tue, 1 Dec 2026 14:56:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796136968; bh=J5phno8CPG7YUWA+n+D+7VFt3J/ydrlsqS5Y899COuo=; h=From:Subject:Reply-To:To:Cc:In-Reply-To:References:Date; b=g18v8y8OKJ4M6v7YM1yhouYMVOCEq5HHIN/Kk0IyYnkMxdhPlgMZR3/suldnVvUW/ JPJZpHKsB18Mt5KJtrN1amLRKhK0Y4azeUol5YLbSjlj3q4KEEnW5ez5vPPwtwKLYM AHainPSnFW2UUHEg2+VKGUYMiKiqrOAjlPfefdPnDCwKK0xUgdHfEX3diMVaymsgWI 3oBHFfoQSX9Zr0d63wPjmjZMwUAJb7cI6kXcvTkxznW9oXrd6jwJFmn3/IhrOhRVGw wScq79q8VW+JGkW8f6GVRnociqCJizUaXjEIyF02RPlfYQVUp0Hvjy8cTO3osk6BMo awZnl0bdMN/9A== Message-ID: From: sashiko-bot@kernel.org Subject: Re: [PATCH net v2] r8152: do not (un)register the PM notifier under RTNL Reply-To: sashiko-reviews@lists.linux.dev To: "Hsin-Te Yuan" Cc: linux-usb@vger.kernel.org In-Reply-To: <20261201-r8152-pm-notifier-rtnl-v2-1-38bae73975dc@chromium.org> References: <20261201-r8152-pm-notifier-rtnl-v2-1-38bae73975dc@chromium.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Date: Tue, 01 Dec 2026 14:56:08 +0000 X-Mailing-List: linux-usb@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list > 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. >=20 > 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: >=20 > 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. >=20 > Fixes: 5ee3c60c8d3b ("r8152: fix the wake event") > Signed-off-by: Hsin-Te Yuan Sashiko has reviewed this patch and found no issues. --=20 Sashiko AI review =C2=B7 https://sashiko.dev/#/patchset/20261201-r8152-pm-n= otifier-rtnl-v2-1-38bae73975dc@chromium.org?part=3D1