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: <20220814064337.32621-2-91tuocao@gmail.com>
Date:   Sun, 14 Aug 2022 14:43:29 +0800
From:   Tuo Cao <91tuocao@...il.com>
To:     James.Bottomley@...senPartnership.com, martin.petersen@...cle.com,
        khalid@...ehiking.org, willy@...radead.org, hare@...e.com
Cc:     anil.gurumurthy@...gic.com, sudarsana.kalluru@...gic.com,
        linux-scsi@...r.kernel.org, linux-kernel@...r.kernel.org,
        91tuocao@...il.com
Subject: [PATCH 1/9] scsi: 53c700: move spin_lock_irqsave to spin_lock in interrupt handler

it is unnecessary to call spin_lock_irqsave in a interrupt handler.

Signed-off-by: Tuo Cao <91tuocao@...il.com>
---
 drivers/scsi/53c700.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/scsi/53c700.c b/drivers/scsi/53c700.c
index e1e4f9d10887..55dc0fb7943e 100644
--- a/drivers/scsi/53c700.c
+++ b/drivers/scsi/53c700.c
@@ -1490,7 +1490,6 @@ NCR_700_intr(int irq, void *dev_id)
 	__u8 istat;
 	__u32 resume_offset = 0;
 	__u8 pun = 0xff, lun = 0xff;
-	unsigned long flags;
 	int handled = 0;
 
 	/* Use the host lock to serialise access to the 53c700
@@ -1498,7 +1497,7 @@ NCR_700_intr(int irq, void *dev_id)
 	 * lock to enter the done routines.  When that happens, we
 	 * need to ensure that for this driver, the host lock and the
 	 * queue lock point to the same thing. */
-	spin_lock_irqsave(host->host_lock, flags);
+	spin_lock(host->host_lock);
 	if((istat = NCR_700_readb(host, ISTAT_REG))
 	      & (SCSI_INT_PENDING | DMA_INT_PENDING)) {
 		__u32 dsps;
@@ -1746,7 +1745,7 @@ NCR_700_intr(int irq, void *dev_id)
 		}
 	}
  out_unlock:
-	spin_unlock_irqrestore(host->host_lock, flags);
+	spin_unlock(host->host_lock);
 	return IRQ_RETVAL(handled);
 }
 
-- 
2.17.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ