Re: [PATCH] scsi: ufs: ufs-pci: Check hba->vops in system PM callbacks
From: Martin K. Petersen (Oracle)
Date: Tue Nov 17 2026 - 23:49:54 EST
On Wed, 11 Nov 2026 16:48:53 +0800, Stanley Jhu wrote:
> ufshcd_pci_tbl[] defines the Samsung 0xC00C and AMD 0x1B29 PCI IDs
> with .driver_data set to 0, so ufshcd_pci_probe() leaves hba->vops
> NULL. Both ufshcd_pci_suspend_prepare() and
> ufshcd_pci_resume_complete() dereference hba->vops->name without
> checking hba->vops:
>
> 1. System suspend on an AMD 0x1B29 or Samsung 0xC00C host enters the
> PM prepare phase and calls ufshcd_pci_suspend_prepare().
> 2. ufshcd_pci_suspend_prepare() evaluates
> strcmp(hba->vops->name, "intel-pci"), dereferences NULL, and
> triggers a kernel oops in the suspending task.
>
> [...]
Applied to 7.4/scsi-fixes, thanks!
[1/1] scsi: ufs: ufs-pci: Check hba->vops in system PM callbacks
https://git.kernel.org/mkp/scsi/c/947d8e9a4d1e
--
Martin K. Petersen