diff options
author | nagalakshmi.nandigama@lsi.com <nagalakshmi.nandigama@lsi.com> | 2012-04-17 07:55:04 +0200 |
---|---|---|
committer | James Bottomley <JBottomley@Parallels.com> | 2012-06-06 05:38:56 +0200 |
commit | a2c658505bf5c75516ee0a79287223e86a2474af (patch) | |
tree | 9fe23d2db75e2a24cae14ad8c6985f6d0b5e8be4 /drivers | |
parent | Pull 'for-linus' branches of git://git.kernel.org/pub/scm/linux/kernel/git/vi... (diff) | |
download | linux-a2c658505bf5c75516ee0a79287223e86a2474af.tar.xz linux-a2c658505bf5c75516ee0a79287223e86a2474af.zip |
[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>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/scsi/mpt2sas/mpt2sas_base.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/scsi/mpt2sas/mpt2sas_base.c b/drivers/scsi/mpt2sas/mpt2sas_base.c index 6102ef2cb2d8..9d46fcbe7755 100644 --- a/drivers/scsi/mpt2sas/mpt2sas_base.c +++ b/drivers/scsi/mpt2sas/mpt2sas_base.c @@ -1792,7 +1792,7 @@ static inline void _base_writeq(__u64 b, volatile void __iomem *addr, static inline u8 _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()]; } /** |