From: Willy Tarreau <w@1wt.eu>
To: linux-kernel@vger.kernel.org, stable@kernel.org
Cc: Jeff Mahoney <jeffm@suse.com>,
Mauro Carvalho Chehab <mchehab@infradead.org>,
Andrew Morton <akpm@linux-foundation.org>,
Chris Wright <chrisw@sous-sol.org>,
Greg Kroah-Hartman <gregkh@suse.de>
Subject: [2.6.20.16 review 24/28] saa7134: fix thread shutdown handling
Date: Sat, 11 Aug 2007 21:48:16 +0200 [thread overview]
Message-ID: <20070811184851.%N@1wt.eu> (raw)
In-Reply-To: 20070811184752.%N@1wt.eu
[-- Attachment #1: 0024-saa7134-fix-thread-shutdown-handling.patch --]
[-- Type: text/plain, Size: 1557 bytes --]
This patch changes the test for the thread pid from >= 0 to > 0.
When the saa7134 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@suse.com>
Acked-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/media/video/saa7134/saa7134-tvaudio.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/media/video/saa7134/saa7134-tvaudio.c b/drivers/media/video/saa7134/saa7134-tvaudio.c
index dd759d6..36b3fa3 100644
--- a/drivers/media/video/saa7134/saa7134-tvaudio.c
+++ b/drivers/media/video/saa7134/saa7134-tvaudio.c
@@ -1006,7 +1006,7 @@ int saa7134_tvaudio_init2(struct saa7134_dev *dev)
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);
--
1.5.2.4
--
next prev parent reply other threads:[~2007-08-11 19:04 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-08-11 18:47 [2.6.20.16 review 00/28] 2.6.20.16 -stable review Willy Tarreau
2007-08-11 19:47 ` [2.6.20.16 review 01/28] i386: Fix K8/core2 oprofile on multiple CPUs Willy Tarreau
2007-08-11 19:47 ` [2.6.20.16 review 02/28] md: Avoid overflow in raid0 calculation with large components Willy Tarreau
2007-08-11 19:47 ` [2.6.20.16 review 03/28] md: Dont write more than is required of the last page of a bitmap Willy Tarreau
2007-08-11 19:47 ` [2.6.20.16 review 04/28] make freezeable workqueues singlethread Willy Tarreau
2007-08-11 19:47 ` [2.6.20.16 review 05/28] Char: cyclades, fix deadlock Willy Tarreau
2007-08-11 19:47 ` [2.6.20.16 review 06/28] e1000: disable polling before registering netdevice Willy Tarreau
2007-08-11 19:48 ` [2.6.20.16 review 08/28] x86_64: allocate sparsemem memmap above 4G Willy Tarreau
2007-08-12 10:18 ` Andi Kleen
2007-08-12 11:52 ` Willy Tarreau
2007-08-11 19:48 ` [2.6.20.16 review 09/28] sparsemem: fix oops in x86_64 show_mem Willy Tarreau
2007-08-11 19:48 ` [2.6.20.16 review 10/28] rt-mutex: Fix stale return value Willy Tarreau
2007-08-11 19:48 ` [2.6.20.16 review 11/28] rt-mutex: Fix chain walk early wakeup bug Willy Tarreau
2007-08-11 19:48 ` [2.6.20.16 review 13/28] md: Fix two raid10 bugs Willy Tarreau
2007-08-11 19:48 ` [2.6.20.16 review 14/28] md: Fix bug in error handling during raid1 repair Willy Tarreau
2007-08-11 19:48 ` [2.6.20.16 review 15/28] dm crypt: disable barriers Willy Tarreau
2007-08-11 19:48 ` [2.6.20.16 review 16/28] dm crypt: fix call to clone_init Willy Tarreau
2007-08-11 19:48 ` [2.6.20.16 review 17/28] dm crypt: fix avoid cloned bio ref after free Willy Tarreau
2007-08-11 19:48 ` [2.6.20.16 review 19/28] sched: fix next_interval determination in idle_balance() Willy Tarreau
2007-08-11 19:48 ` [2.6.20.16 review 21/28] audit: fix oops removing watch if audit disabled Willy Tarreau
2007-08-11 19:48 ` [2.6.20.16 review 22/28] POWERPC: Fix subtle FP state corruption bug in signal return on SMP Willy Tarreau
2007-08-11 19:48 ` [2.6.20.16 review 23/28] mm: kill validate_anon_vma to avoid mapcount BUG Willy Tarreau
2007-08-11 19:48 ` Willy Tarreau [this message]
2007-08-11 19:48 ` [2.6.20.16 review 25/28] serial: clear proper MPSC interrupt cause bits Willy Tarreau
2007-08-11 19:48 ` [2.6.20.16 review 26/28] i386: fix infinite loop with singlestep int80 syscalls Willy Tarreau
2007-08-11 19:48 ` [2.6.20.16 review 27/28] NTP: remove clock_was_set() call to prevent deadlock Willy Tarreau
2007-08-12 11:15 ` Jason Uhlenkott
2007-08-12 11:47 ` Willy Tarreau
2007-08-11 19:48 ` [2.6.20.16 review 28/28] sky2: workaround for lost IRQ Willy Tarreau
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20070811184851.%N@1wt.eu \
--to=w@1wt.eu \
--cc=akpm@linux-foundation.org \
--cc=chrisw@sous-sol.org \
--cc=gregkh@suse.de \
--cc=jeffm@suse.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mchehab@infradead.org \
--cc=stable@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox