RE: [PATCH] scsi/mpt2sas: remove unnecesscary preempt requirement for MSIX

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


Alex, 
I submitted this patch already. 

James, request you to pick up the patch that I previously submitted for fixing this issue. Attaching the patch that I submitted previously.


Regards,
Nagalakshmi


-----Original Message-----
From: Alex Shi [mailto:alex.shi@xxxxxxxxx] 
Sent: Saturday, April 28, 2012 11:58 AM
To: JBottomley@xxxxxxxxxxxxx; Nandigama, Nagalakshmi
Cc: linux-scsi@xxxxxxxxxxxxxxx; linux-kernel@xxxxxxxxxxxxxxx; alex.shi@xxxxxxxxx
Subject: [PATCH] scsi/mpt2sas: remove unnecesscary preempt requirement for MSIX

smp_processor_id() need used in preempt safe ENV. Otherwise, the
cpu may be preempted and run on other cpus. But here, we don't care much
the specific CPU which handler the MSI, so just replace it by
raw_smp_processor_id() to avoid preempt debug warning.

Signed-off-by: Alex Shi <alex.shi@xxxxxxxxx>
---
 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 8a59a77..3f518ba 100644
--- a/drivers/scsi/mpt2sas/mpt2sas_base.c
+++ b/drivers/scsi/mpt2sas/mpt2sas_base.c
@@ -1785,7 +1785,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()];
 }
 
 /**
-- 
1.7.5.4

--- Begin Message ---
James, this patch is not picked up for 3.5. Request you to push this patch for next release.

Regards,
Nagalakshmi


-----Original Message-----
From: nagalakshmi.nandigama@xxxxxxx [mailto:nagalakshmi.nandigama@xxxxxxx]
Sent: Tuesday, April 17, 2012 11:25 AM
To: stable@xxxxxxxxxxxxxxx; linux-scsi@xxxxxxxxxxxxxxx; Nandigama, Nagalakshmi; Prakash, Sathya; Moore, Eric
Cc: jejb@xxxxxxxxxx
Subject: [PATCH] [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@xxxxxxx>
CC: stable@xxxxxxxxxxxxxxx
---

diff --git a/drivers/scsi/mpt2sas/mpt2sas_base.c b/drivers/scsi/mpt2sas/mpt2sas_base.c
index 272fab7..b010be0 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()];
 }

 /**

--- End Message ---

[SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Photos]     [Yosemite]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

Add to Google Powered by Linux