From: Laurent Pinchart Date: Mon, 16 Feb 2015 17:38:28 +0000 (-0300) Subject: [media] uvcvideo: Don't call vb2 mmap and get_unmapped_area with queue lock held X-Git-Tag: omap-for-v4.1/fixes-rc1~72^2~1^2~245 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9e68c53910721ffc55c05ee9bbc08129c796b470;p=pandora-kernel.git [media] uvcvideo: Don't call vb2 mmap and get_unmapped_area with queue lock held videobuf2 has long been subject to AB-BA style deadlocks due to the queue lock and mmap_sem being taken in different orders for the mmap and get_unmapped_area operations. The problem has been fixed by making those two operations callable without taking the queue lock, using an mmap_lock internal to videobuf2. The uvcvideo driver still calls the mmap and get_unmapped_area operations with the queue lock held, resulting in a potential deadlock. As the operations can now be called without locking the queue, fix it. Reported-by: Bjørn Mork Signed-off-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab --- Reading git-diff-tree failed