From: Arjan van de Ven Date: Tue, 20 May 2008 16:53:52 +0000 (-0700) Subject: Fix a deadlock in the bttv driver X-Git-Tag: v2.6.26-rc4~98 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=81b2dbcad86732ffc02bad87aa25c4651199fc77;p=pandora-kernel.git Fix a deadlock in the bttv driver vidiocgmbuf() does this: mutex_lock(&fh->cap.vb_lock); retval = videobuf_mmap_setup(&fh->cap, gbuffers, gbufsize, V4L2_MEMORY_MMAP); and videobuf_mmap_setup() then just does mutex_lock(&q->vb_lock); ret = __videobuf_mmap_setup(q, bcount, bsize, memory); mutex_unlock(&q->vb_lock); which is an obvious double-take deadlock. This patch fixes this by having vidiocgmbuf() just call the __videobuf_mmap_setup function instead. Acked-by: Mauro Carvalho Chehab Reported-by: Koos Vriezen Signed-off-by: Arjan van de Ven Signed-off-by: Linus Torvalds --- Reading git-diff-tree failed