mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Adrian Bunk <bunk@stusta.de>
To: Shane <gnome42@gmail.com>
Cc: Mauro Carvalho Chehab <mchehab@infradead.org>,
	Adrian Bunk <bunk@kernel.org>, Brandon Philips <brandon@ifup.org>,
	linux-kernel@vger.kernel.org,
	video4linux-list <video4linux-list@redhat.com>
Subject: [2.6 patch] videobuf-core.c locking fixes
Date: Wed, 12 Dec 2007 20:44:54 +0100	[thread overview]
Message-ID: <20071212194454.GF10069@stusta.de> (raw)
In-Reply-To: <fa4052ef0712121057o51230b22ycb79723091438779@mail.gmail.com>

On Wed, Dec 12, 2007 at 01:57:27PM -0500, Shane wrote:
> On Dec 12, 2007 11:37 AM, Shane <gnome42@gmail.com> wrote:
> > On Dec 12, 2007 9:21 AM, Mauro Carvalho Chehab <mchehab@infradead.org> wrote:
> > ...
> > > The proper solution is provided by this changeset:
> > > http://git.kernel.org/?p=linux/kernel/git/mchehab/v4l-dvb.git;a=commitdiff;h=19fb1457990b6b7e15586ec7331541a184233acc
> >
> > I applied this and it seems fine with a bttv card.
> 
> Ugh, after further testing with a bttv card it seems this is not fine.
> 
> vbi doesn't work anymore and my application gets stuck in a Zombie,
> unkillable, have to reboot state :(
> 
> mythtv    3683     1  -3  2.4  0.0      0     0 ?        Z<l  13:40:35
> 00:00:06 [mythbackend] <defunct>
> 
> Reverting Mauro's patch above does fix the problem.

Thanks for testing, does the patch below fix it?

> Shane

cu
Adrian


<--  snip  -->


After commit 19fb1457990b6b7e15586ec7331541a184233acc the callers in 
videobuf-core.c that already hold the lock must call 
__videobuf_read_start() instead of videobuf_read_start().

Signed-off-by: Adrian Bunk <bunk@kernel.org>

---

 drivers/media/video/videobuf-core.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

e1f8b4a49d86746f699919531c17fd154787e308 
diff --git a/drivers/media/video/videobuf-core.c b/drivers/media/video/videobuf-core.c
index 81f77d2..c8a5cb5 100644
--- a/drivers/media/video/videobuf-core.c
+++ b/drivers/media/video/videobuf-core.c
@@ -909,7 +909,7 @@ ssize_t videobuf_read_stream(struct videobuf_queue *q,
 	if (q->streaming)
 		goto done;
 	if (!q->reading) {
-		retval = videobuf_read_start(q);
+		retval = __videobuf_read_start(q);
 		if (retval < 0)
 			goto done;
 	}
@@ -982,7 +982,7 @@ unsigned int videobuf_poll_stream(struct file *file,
 					 struct videobuf_buffer, stream);
 	} else {
 		if (!q->reading)
-			videobuf_read_start(q);
+			__videobuf_read_start(q);
 		if (!q->reading) {
 			rc = POLLERR;
 		} else if (NULL == q->read_buf) {


  reply	other threads:[~2007-12-12 19:45 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-12-12  5:20 2.6.24-rc5 "videobuf_read_start" [drivers/media/video/videobuf-dvb.ko] undefined! Shane
2007-12-12  9:07 ` Adrian Bunk
2007-12-12 11:03   ` Mauro Carvalho Chehab
2007-12-12 12:03     ` Adrian Bunk
2007-12-12 14:21       ` Mauro Carvalho Chehab
2007-12-12 16:37         ` Shane
2007-12-12 18:57           ` Shane
2007-12-12 19:44             ` Adrian Bunk [this message]
2007-12-12 20:35               ` [2.6 patch] videobuf-core.c locking fixes Shane
2007-12-12 21:22                 ` Shane
2007-12-14  9:26                   ` Mauro Carvalho Chehab
2007-12-13  9:59                 ` Mauro Carvalho Chehab
2007-12-12 22:19         ` 2.6.24-rc5 "videobuf_read_start" [drivers/media/video/videobuf-dvb.ko] undefined! Jean Delvare
2007-12-13 10:33           ` Mauro Carvalho Chehab
2007-12-12 10:36 ` Soeren Sonnenburg
2007-12-12 10:51 ` Mauro Carvalho Chehab

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=20071212194454.GF10069@stusta.de \
    --to=bunk@stusta.de \
    --cc=brandon@ifup.org \
    --cc=bunk@kernel.org \
    --cc=gnome42@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mchehab@infradead.org \
    --cc=video4linux-list@redhat.com \
    /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

Powered by JetHome