From: Laurent Pinchart Date: Thu, 17 Dec 2009 00:20:45 +0000 (-0300) Subject: V4L/DVB (13831): uvcvideo: Fix oops caused by a race condition in buffer dequeuing X-Git-Tag: v2.6.33-rc5~24^2~18 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d7c0d43997cf716617d724554d19b3b8dd465833;p=pandora-kernel.git V4L/DVB (13831): uvcvideo: Fix oops caused by a race condition in buffer dequeuing Buffers were marked as done before being removed from the IRQ queue. If a userspace application dequeued and requeued the buffer fast enough during that time window, the buffer could end up being deleted twice, generating an oops in interrupt context. Add a new state, UVC_BUF_STATE_READY, to mark buffers as ready for reuse but not yet removed from the queue, and transition to UVC_BUF_STATE_DONE only when the buffer is removed from the queue. Signed-off-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab --- Reading git-diff-tree failed