mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-05 01:54:09 +08:00
scsi: mpi3mr: Driver unload crashes host when enhanced logging is enabled
Prevent driver from trying to dereference a NULL pointer in a debug print while removing a device during driver unload. Signed-off-by: Ranjan Kumar <ranjan.kumar@broadcom.com> Signed-off-by: Sreekanth Reddy <sreekanth.reddy@broadcom.com> Link: https://lore.kernel.org/r/20230228140835.4075-3-ranjan.kumar@broadcom.com Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
This commit is contained in:
parent
02ca7da291
commit
5b06a7169c
@ -1552,7 +1552,8 @@ static void mpi3mr_sas_port_remove(struct mpi3mr_ioc *mrioc, u64 sas_address,
|
||||
|
||||
list_for_each_entry_safe(mr_sas_phy, next_phy,
|
||||
&mr_sas_port->phy_list, port_siblings) {
|
||||
if ((mrioc->logging_level & MPI3_DEBUG_TRANSPORT_INFO))
|
||||
if ((!mrioc->stop_drv_processing) &&
|
||||
(mrioc->logging_level & MPI3_DEBUG_TRANSPORT_INFO))
|
||||
dev_info(&mr_sas_port->port->dev,
|
||||
"remove: sas_address(0x%016llx), phy(%d)\n",
|
||||
(unsigned long long)
|
||||
|
Loading…
Reference in New Issue
Block a user