浏览代码

[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 <nagalakshmi.nandigama@lsi.com>
CC: stable@vger.kernel.org
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
nagalakshmi.nandigama@lsi.com 13 年之前
父节点
当前提交
a2c658505b
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      drivers/scsi/mpt2sas/mpt2sas_base.c

+ 1 - 1
drivers/scsi/mpt2sas/mpt2sas_base.c

@@ -1792,7 +1792,7 @@ static inline void _base_writeq(__u64 b, volatile void __iomem *addr,
 static inline u8
 static inline u8
 _base_get_msix_index(struct MPT2SAS_ADAPTER *ioc)
 _base_get_msix_index(struct MPT2SAS_ADAPTER *ioc)
 {
 {
-	return ioc->cpu_msix_table[smp_processor_id()];
+	return ioc->cpu_msix_table[raw_smp_processor_id()];
 }
 }
 
 
 /**
 /**