From: Oliver Neukum Date: Thu, 10 Jan 2013 10:04:55 +0000 (-0300) Subject: [media] uvcvideo: Fix race of open and suspend in error case X-Git-Tag: v3.9-rc1~93^2~179 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a82a45f65377b05fe8cd3167c7b0a70c508356b8;p=pandora-kernel.git [media] uvcvideo: Fix race of open and suspend in error case Ming Lei reported: IMO, there is a minor fault in the error handling path of uvc_status_start() inside uvc_v4l2_open(), and the 'users' count should have been decreased before usb_autopm_put_interface(). In theory, a [URB resubmission] warning can be triggered when the device is opened just between usb_autopm_put_interface() and atomic_dec(&stream->dev->users). The fix is trivial. Reported-by: Ming Lei Signed-off-by: Oliver Neukum Signed-off-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab --- Reading git-diff-tree failed