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]
Date:	Thu, 21 Jun 2007 14:45:22 -0400
From:	Jeff Mahoney <jeffm@...e.com>
To:	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Cc:	Gerd Knorr <kraxel@...esex.org>, Andrew Morton <akpm@...l.org>
Subject: [PATCH] saa7134: fix thread shutdown handling

 This patch changes the test for the thread pid from >= 0 to > 0.

 When the saa8134 driver initialization fails after a certain point,
 it goes through the complete shutdown process for the driver. Part
 of shutting it down includes tearing down the thread for tv audio.

 The test for tearing down the thread tests for >= 0. Since the dev
 structure is kzalloc'd, the test will always be true if we haven't
 tried to start the thread yet. We end up waiting on pid 0 to complete,
 which will never happen, so we lock up.

 This bug was observed in Novell Bugzilla 284718, when request_irq()
 failed.

Signed-off-by: Jeff Mahoney <jeffm@...e.com>

---

 drivers/media/video/saa7134/saa7134-tvaudio.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/media/video/saa7134/saa7134-tvaudio.c	2007-06-12 15:45:16.000000000 -0400
+++ b/drivers/media/video/saa7134/saa7134-tvaudio.c	2007-06-15 14:16:14.000000000 -0400
@@ -1005,7 +1005,7 @@
 int saa7134_tvaudio_fini(struct saa7134_dev *dev)
 {
 	/* shutdown tvaudio thread */
-	if (dev->thread.pid >= 0) {
+	if (dev->thread.pid > 0) {
 		dev->thread.shutdown = 1;
 		wake_up_interruptible(&dev->thread.wq);
 		wait_for_completion(&dev->thread.exit);

-- 
Jeff Mahoney
SUSE Labs
-
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