[<prev] [next>] [day] [month] [year] [list]
Message-Id: <1454342370-14609-1-git-send-email-wuninsu@gmail.com>
Date: Mon, 1 Feb 2016 10:59:30 -0500
From: Insu Yun <wuninsu@...il.com>
To: hverkuil@...all.nl, mchehab@....samsung.com, khoroshilov@...ras.ru,
arnd@...db.de, vdronov@...hat.com, oneukum@...e.com,
linux-media@...r.kernel.org, linux-kernel@...r.kernel.org
Cc: taesoo@...ech.edu, yeongjin.jang@...ech.edu, insu@...ech.edu,
changwoo@...ech.edu, Insu Yun <wuninsu@...il.com>
Subject: [PATCH] usbvision: fix locking error
When remove_pending is non-zero, v4l2_lock is never unlocked.
Signed-off-by: Insu Yun <wuninsu@...il.com>
---
drivers/media/usb/usbvision/usbvision-video.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/media/usb/usbvision/usbvision-video.c b/drivers/media/usb/usbvision/usbvision-video.c
index de9ff3b..75d06ea 100644
--- a/drivers/media/usb/usbvision/usbvision-video.c
+++ b/drivers/media/usb/usbvision/usbvision-video.c
@@ -1156,6 +1156,7 @@ static int usbvision_radio_close(struct file *file)
usbvision_audio_off(usbvision);
usbvision->radio = 0;
usbvision->user--;
+ mutex_unlock(&usbvision->v4l2_lock);
if (usbvision->remove_pending) {
printk(KERN_INFO "%s: Final disconnect\n", __func__);
@@ -1164,7 +1165,6 @@ static int usbvision_radio_close(struct file *file)
return 0;
}
- mutex_unlock(&usbvision->v4l2_lock);
PDEBUG(DBG_IO, "success");
return v4l2_fh_release(file);
}
--
1.9.1
Powered by blists - more mailing lists