Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1337579

[PATCH] serial: samsung: fix the inconsistency in spinlock

From Anand Moon <linux.amoon@gmail.com>
Newsgroups linux.kernel
Subject [PATCH] serial: samsung: fix the inconsistency in spinlock
Date 2016-02-18 18:50 +0100
Message-ID <r3ASe-CA-3@gated-at.bofh.it> (permalink)
Organization linux.* mail to news gateway

Show all headers | View raw


From: Anand Moon <linux.amoon@gmail.com>

changes fix the correct order of the spin_lock_irqrestore/save.

Signed-off-by: Anand Moon <linux.amoon@gmail.com>
---
 drivers/tty/serial/samsung.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/tty/serial/samsung.c b/drivers/tty/serial/samsung.c
index d72cd73..96fe14d 100644
--- a/drivers/tty/serial/samsung.c
+++ b/drivers/tty/serial/samsung.c
@@ -759,9 +759,9 @@ static irqreturn_t s3c24xx_serial_tx_chars(int irq, void *id)
 	}
 
 	if (uart_circ_chars_pending(xmit) < WAKEUP_CHARS) {
-		spin_unlock(&port->lock);
+		spin_unlock_irqrestore(&port->lock, flags);
 		uart_write_wakeup(port);
-		spin_lock(&port->lock);
+		spin_lock_irqsave(&port->lock, flags);
 	}
 
 	if (uart_circ_empty(xmit))
-- 
1.9.1

Back to linux.kernel | Previous | NextNext in thread | Find similar | Unroll thread


Thread

[PATCH] serial: samsung: fix the inconsistency in spinlock Anand Moon <linux.amoon@gmail.com> - 2016-02-18 18:50 +0100
  Re: [PATCH] serial: samsung: fix the inconsistency in spinlock Peter Hurley <peter@hurleysoftware.com> - 2016-02-18 18:50 +0100
    Re: [PATCH] serial: samsung: fix the inconsistency in spinlock Anand Moon <linux.amoon@gmail.com> - 2016-02-18 20:20 +0100
      Re: [PATCH] serial: samsung: fix the inconsistency in spinlock Peter Hurley <peter@hurleysoftware.com> - 2016-02-18 21:10 +0100
      Re: [PATCH] serial: samsung: fix the inconsistency in spinlock Krzysztof Kozlowski <k.kozlowski@samsung.com> - 2016-02-19 07:20 +0100
        Re: [PATCH] serial: samsung: fix the inconsistency in spinlock Anand Moon <linux.amoon@gmail.com> - 2016-02-19 08:00 +0100
          Re: [PATCH] serial: samsung: fix the inconsistency in spinlock Krzysztof Kozlowski <k.kozlowski@samsung.com> - 2016-02-19 08:50 +0100
            Re: [PATCH] serial: samsung: fix the inconsistency in spinlock Krzysztof Kozlowski <k.kozlowski@samsung.com> - 2016-02-19 09:30 +0100
              Re: [PATCH] serial: samsung: fix the inconsistency in spinlock Anand Moon <linux.amoon@gmail.com> - 2016-02-19 09:40 +0100
                Re: [PATCH] serial: samsung: fix the inconsistency in spinlock Krzysztof Kozlowski <k.kozlowski@samsung.com> - 2016-02-21 02:40 +0100
            Re: [PATCH] serial: samsung: fix the inconsistency in spinlock Anand Moon <linux.amoon@gmail.com> - 2016-02-19 09:30 +0100

csiph-web