lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <8cc2cf81-c1c8-4d00-a0d1-39b047b91280@acm.org>
Date: Thu, 20 Nov 2025 08:32:08 -0800
From: Bart Van Assche <bvanassche@....org>
To: Po-Wen Kao <powenkao@...gle.com>
Cc: Alim Akhtar <alim.akhtar@...sung.com>, Avri Altman <avri.altman@....com>,
 "James E.J. Bottomley" <James.Bottomley@...senPartnership.com>,
 "Martin K. Petersen" <martin.petersen@...cle.com>,
 Peter Wang <peter.wang@...iatek.com>, Bean Huo <beanhuo@...ron.com>,
 Manivannan Sadhasivam <mani@...nel.org>,
 "Bao D. Nguyen" <quic_nguyenb@...cinc.com>,
 Adrian Hunter <adrian.hunter@...el.com>,
 "open list:UNIVERSAL FLASH STORAGE HOST CONTROLLER DRIVER"
 <linux-scsi@...r.kernel.org>, open list <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 1/1] scsi: ufs: core: Fix EH failure after wlun resume
 error

On 11/11/25 10:32 PM, Po-Wen Kao wrote:
> When a W-LUN resume fails, its parent devices in the SCSI hierarchy,
> including the scsi_target, may be runtime suspended. Subsequently, the
> error handler in ufshcd_recover_pm_error() fails to set the W-LUN
> device back to active because the parent target is not active.
> This results in the following errors:
> 
>    google-ufshcd 3c2d0000.ufs: ufshcd_err_handler started; HBA state eh_fatal; ...
>    ufs_device_wlun 0:0:0:49488: START_STOP failed for power mode: 1, result 40000
>    ufs_device_wlun 0:0:0:49488: ufshcd_wl_runtime_resume failed: -5
>    ...
>    ufs_device_wlun 0:0:0:49488: runtime PM trying to activate child device 0:0:0:49488 but parent (target0:0:0) is not active
> 
> This patch addresses this by:
> 
> 1.  Ensuring the W-LUN's parent scsi_target is runtime resumed before
> attempting to set the W-LUN to active within ufshcd_recover_pm_error().
> 2.  Explicitly checking for power.runtime_error on the HBA and W-LUN
> devices before calling pm_runtime_set_active() to clear the error state.
> 3.  Adding pm_runtime_get_sync(hba->dev) in
> ufshcd_err_handling_prepare() to ensure the HBA itself
> is active during error recovery, even if a child device resume failed.
> 
> These changes ensure the device power states are managed correctly
> during error recovery.

Reviewed-by: Bart Van Assche <bvanassche@....org>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ