Skip to content

Commit a2c6585

Browse files
nagalakshmi.nandigama@lsi.comJames Bottomley
authored andcommitted
[SCSI] mpt2sas: Fix unsafe using smp_processor_id() in preemptible
When CONFIG_DEBUG_PREEMPT is enabled, bug is observed in the smp_processor_id(). This is because smp_processor_id() is not called in preempt safe condition. To fix this issue, use raw_smp_processor_id instead of smp_processor_id. Signed-off-by: Nagalakshmi Nandigama <[email protected]> CC: [email protected] Signed-off-by: James Bottomley <[email protected]>
1 parent 99becf1 commit a2c6585

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/scsi/mpt2sas/mpt2sas_base.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1792,7 +1792,7 @@ static inline void _base_writeq(__u64 b, volatile void __iomem *addr,
17921792
static inline u8
17931793
_base_get_msix_index(struct MPT2SAS_ADAPTER *ioc)
17941794
{
1795-
return ioc->cpu_msix_table[smp_processor_id()];
1795+
return ioc->cpu_msix_table[raw_smp_processor_id()];
17961796
}
17971797

17981798
/**

0 commit comments

Comments
 (0)