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>] [day] [month] [year] [list]
Message-Id: <20220813155113.13427-1-91tuocao@gmail.com>
Date:   Sat, 13 Aug 2022 23:51:13 +0800
From:   Tuo Cao <91tuocao@...il.com>
To:     alcooperx@...il.com, gregkh@...uxfoundation.org
Cc:     bcm-kernel-feedback-list@...adcom.com,
        linux-serial@...r.kernel.org, linux-kernel@...r.kernel.org,
        91tuocao@...il.com
Subject: [PATCH] serial: 8250_bcm7271: move spin_lock_irqsave to spin_lock in irq handler

it is unnecessary to call spin_lock_irqsave in a irq handler.

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

diff --git a/drivers/tty/serial/8250/8250_bcm7271.c b/drivers/tty/serial/8250/8250_bcm7271.c
index 8efdc271eb75..fb525c435723 100644
--- a/drivers/tty/serial/8250/8250_bcm7271.c
+++ b/drivers/tty/serial/8250/8250_bcm7271.c
@@ -560,7 +560,6 @@ static irqreturn_t brcmuart_isr(int irq, void *dev_id)
 	struct uart_port *up = dev_id;
 	struct device *dev = up->dev;
 	struct brcmuart_priv *priv = up->private_data;
-	unsigned long flags;
 	u32 interrupts;
 	u32 rval;
 	u32 tval;
@@ -569,7 +568,7 @@ static irqreturn_t brcmuart_isr(int irq, void *dev_id)
 	if (interrupts == 0)
 		return IRQ_NONE;
 
-	spin_lock_irqsave(&up->lock, flags);
+	spin_lock(&up->lock);
 
 	/* Clear all interrupts */
 	udma_writel(priv, REGS_DMA_ISR, UDMA_INTR_CLEAR, interrupts);
@@ -583,7 +582,7 @@ static irqreturn_t brcmuart_isr(int irq, void *dev_id)
 	if ((rval | tval) == 0)
 		dev_warn(dev, "Spurious interrupt: 0x%x\n", interrupts);
 
-	spin_unlock_irqrestore(&up->lock, flags);
+	spin_unlock(&up->lock);
 	return IRQ_HANDLED;
 }
 
-- 
2.17.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ