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-next>] [day] [month] [year] [list]
Message-Id: <1319804185-18559-1-git-send-email-michael.thalmeier@hale.at>
Date:	Fri, 28 Oct 2011 14:16:25 +0200
From:	Michael Thalmeier <michael.thalmeier@...e.at>
To:	Thomas Gleixner <tglx@...utronix.de>
Cc:	rt <linux-rt-users@...r.kernel.org>,
	lkml <linux-kernel@...r.kernel.org>,
	Michael Thalmeier <michael@...lmeier.at>
Subject: [PATCH] USB: g_serial: fix deadlock with PREEMPT_RT enabled

In commit 44a0c0190b500ee6bcfc0976fe540f65dee2cd67 unlocking of spin_locks has
been removed. This patch party restores this functionality.

Signed-off-by: Michael Thalmeier <michael.thalmeier@...e.at>
---
 drivers/usb/gadget/u_serial.c |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/drivers/usb/gadget/u_serial.c b/drivers/usb/gadget/u_serial.c
index 40f7716..a925b9e 100644
--- a/drivers/usb/gadget/u_serial.c
+++ b/drivers/usb/gadget/u_serial.c
@@ -553,7 +553,16 @@ recycle:
 	 * a workqueue, so we won't get callbacks and can hold port_lock
 	 */
 	if (tty && do_push) {
+		/*
+		 * Drop the lock here since it might end up calling
+		 * gs_flush_chars, which takes the lock.
+		 */
+		spin_unlock_irq(&port->port_lock);
 		tty_flip_buffer_push(tty);
+		spin_lock_irq(&port->port_lock);
+
+		/* tty may have been closed */
+		tty = port->port_tty;
 	}
 
 
-- 
1.7.6.4



--
Scanned by MailScanner.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ