lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1612697823-8073-22-git-send-email-tanxiaofei@huawei.com>
Date:   Sun, 7 Feb 2021 19:36:52 +0800
From:   Xiaofei Tan <tanxiaofei@...wei.com>
To:     <jejb@...ux.ibm.com>, <martin.petersen@...cle.com>
CC:     <linux-scsi@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
        <linuxarm@...neuler.org>, Xiaofei Tan <tanxiaofei@...wei.com>
Subject: [PATCH for-next 21/32] scsi: myrs: Replace spin_lock_irqsave with spin_lock in hard IRQ

It is redundant to do irqsave and irqrestore in hardIRQ context, where
it has been in a irq-disabled context.

Signed-off-by: Xiaofei Tan <tanxiaofei@...wei.com>
---
 drivers/scsi/myrs.c | 15 ++++++---------
 1 file changed, 6 insertions(+), 9 deletions(-)

diff --git a/drivers/scsi/myrs.c b/drivers/scsi/myrs.c
index 4adf9de..59379fc 100644
--- a/drivers/scsi/myrs.c
+++ b/drivers/scsi/myrs.c
@@ -2615,9 +2615,8 @@ static irqreturn_t DAC960_GEM_intr_handler(int irq, void *arg)
 	struct myrs_hba *cs = arg;
 	void __iomem *base = cs->io_base;
 	struct myrs_stat_mbox *next_stat_mbox;
-	unsigned long flags;
 
-	spin_lock_irqsave(&cs->queue_lock, flags);
+	spin_lock(&cs->queue_lock);
 	DAC960_GEM_ack_intr(base);
 	next_stat_mbox = cs->next_stat_mbox;
 	while (next_stat_mbox->id > 0) {
@@ -2654,7 +2653,7 @@ static irqreturn_t DAC960_GEM_intr_handler(int irq, void *arg)
 		}
 	}
 	cs->next_stat_mbox = next_stat_mbox;
-	spin_unlock_irqrestore(&cs->queue_lock, flags);
+	spin_unlock(&cs->queue_lock);
 	return IRQ_HANDLED;
 }
 
@@ -2865,9 +2864,8 @@ static irqreturn_t DAC960_BA_intr_handler(int irq, void *arg)
 	struct myrs_hba *cs = arg;
 	void __iomem *base = cs->io_base;
 	struct myrs_stat_mbox *next_stat_mbox;
-	unsigned long flags;
 
-	spin_lock_irqsave(&cs->queue_lock, flags);
+	spin_lock(&cs->queue_lock);
 	DAC960_BA_ack_intr(base);
 	next_stat_mbox = cs->next_stat_mbox;
 	while (next_stat_mbox->id > 0) {
@@ -2904,7 +2902,7 @@ static irqreturn_t DAC960_BA_intr_handler(int irq, void *arg)
 		}
 	}
 	cs->next_stat_mbox = next_stat_mbox;
-	spin_unlock_irqrestore(&cs->queue_lock, flags);
+	spin_unlock(&cs->queue_lock);
 	return IRQ_HANDLED;
 }
 
@@ -3115,9 +3113,8 @@ static irqreturn_t DAC960_LP_intr_handler(int irq, void *arg)
 	struct myrs_hba *cs = arg;
 	void __iomem *base = cs->io_base;
 	struct myrs_stat_mbox *next_stat_mbox;
-	unsigned long flags;
 
-	spin_lock_irqsave(&cs->queue_lock, flags);
+	spin_lock(&cs->queue_lock);
 	DAC960_LP_ack_intr(base);
 	next_stat_mbox = cs->next_stat_mbox;
 	while (next_stat_mbox->id > 0) {
@@ -3154,7 +3151,7 @@ static irqreturn_t DAC960_LP_intr_handler(int irq, void *arg)
 		}
 	}
 	cs->next_stat_mbox = next_stat_mbox;
-	spin_unlock_irqrestore(&cs->queue_lock, flags);
+	spin_unlock(&cs->queue_lock);
 	return IRQ_HANDLED;
 }
 
-- 
2.8.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ