Skip to content

Commit

Permalink
[SCSI] mpt2sas: Fix unsafe using smp_processor_id() in preemptible
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
nagalakshmi.nandigama@lsi.com authored and James Bottomley committed Jun 6, 2012
1 parent 99becf1 commit a2c6585
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/scsi/mpt2sas/mpt2sas_base.c
Original file line number Diff line number Diff line change
Expand Up @@ -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()];
}

/**
Expand Down

0 comments on commit a2c6585

Please sign in to comment.