From: Alexander Strakh
Error path in file drivers/media/video/tlg2300/pd-video.c:
1. First mutex_unlock on &pd->lock in line 767 (in function that
called from line 805)
2. Second in line 806
805pd_vidioc_s_fmt(pd, &f->fmt.pix);
806mutex_unlock(&pd->l
From: Alexander Strakh
1. First mutex_lock on &radio->lock in line 441
2. Second in line 462
I think that mutex in line 462 is not needed. In kernel v2.6.36.3 function si470
x_rds_on contains mutex_lock/mutex_unlock. Have no mutex_lock in line 441. In
kernel v2.6.37 mutex_lock/mutex
yte count */
459count /= 3;
460
461/* copy RDS block out of internal buffer and to user buffer */
462mutex_lock(&radio->lock);
Found by Linux Device Drivers Verification Project
Remove second mutex.
Signed-off-by: Alexander Strakh
___
diff --git a/drivers/media/radi
l ack it.
>
> Best Regards
> Huang Shijie
>
> 2010/12/13 Alexander Strakh :
> >KERNEL_VERSION: 2.6.36
> >SUBJECT: double mutex_lock in
> > drivers/media/video/tlg2300/pd-video.c in function vidioc_s_fmt
> >SUBSCRIBE:
> >F
KERNEL_VERSION: 2.6.36
SUBJECT: return from function without mutex_unlock in
drivers/media/video/cx231xx/cx231xx-core.c
SUBSCRIBE:
1. In line 282 in function cx231xx_read_ctrl_reg mutex was locked.
2. If usb_control_msg returns ret<0 then we exit from function
cx231x
>fmt.pix);
806mutex_unlock(&pd->lock);
Found by Linux Device Drivers Verification Project
Сhecks the return code of pd_vidioc_s_fm before mutex_unlocking.
Signed-off-by: Alexander Strakh
---
diff --git a/drivers/media/video/tlg2300/pd-video.c
b/drivers/media/video/tlg2300/pd-video
KERNEL_VERSION: 2.6.31
DESCRIBE:
In driver ./drivers/media/radio/radio-gemtek-pci.c
mutex_lock is called first time in line 184, then in line 186
gemtek_pci_setfrequency is called.
182 static void gemtek_pci_unmute(struct gemtek_pci *card)
183 {
184 mutex_lock(&card->
In driver ./drivers/media/video/usbvideo/konicawc.c in line 227:
227 usb_make_path(dev, cam->input_physname, sizeof(cam-
>input_physname));
After this line we use strncat:
228 strncat(cam->input_physname, "/input0", sizeof(cam-
>input_physname));
where sizeof(cam->input_phy
In driver ./drivers/media/video/usbvideo/quickcam_messenger.c in line
91:
91 usb_make_path(dev, cam->input_physname, sizeof(cam-
>input_physname));
After this line we use strncat:
92 strncat(cam->input_physname, "/input0", sizeof(cam-
>input_physname));
where sizeof(ca