diff options
author | Brandon Philips <brandon@ifup.org> | 2008-04-22 14:45:32 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2008-04-24 14:07:46 -0300 |
commit | e43d76b40d3fda146b9cd1192c5504a257603b70 (patch) | |
tree | 8e32eb7f19c529f3cf0771072aa29717b791734c /drivers/media/video/videobuf-core.c | |
parent | 9dc4e48fbea5412127ce2eb30d688c4fc55f5565 (diff) | |
download | linux-e43d76b40d3fda146b9cd1192c5504a257603b70.tar.gz linux-e43d76b40d3fda146b9cd1192c5504a257603b70.tar.bz2 linux-e43d76b40d3fda146b9cd1192c5504a257603b70.zip |
V4L/DVB (7281): v4l: Deadlock in videobuf-core for DQBUF waiting on QBUF
Avoid a deadlock where DQBUF is holding the vb_lock while waiting on a QBUF
which also needs the vb_lock. Reported by Hans Verkuil <hverkuil@xs4all.nl>.
Signed-off-by: Brandon Philips <bphilips@suse.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/video/videobuf-core.c')
-rw-r--r-- | drivers/media/video/videobuf-core.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/media/video/videobuf-core.c b/drivers/media/video/videobuf-core.c index eab79ffdf56a..5ea635fac236 100644 --- a/drivers/media/video/videobuf-core.c +++ b/drivers/media/video/videobuf-core.c @@ -605,7 +605,9 @@ int videobuf_dqbuf(struct videobuf_queue *q, goto done; } buf = list_entry(q->stream.next, struct videobuf_buffer, stream); + mutex_unlock(&q->vb_lock); retval = videobuf_waiton(buf, nonblocking, 1); + mutex_lock(&q->vb_lock); if (retval < 0) { dprintk(1, "dqbuf: waiton returned %d\n", retval); goto done; |