Re: [PATCH v2] videobuf2: Add missing lock held on vb2_fop_relase

2013-10-31 Thread Sylwester Nawrocki
On 31/10/13 14:42, Mauro Carvalho Chehab wrote: > Em Sat, 19 Oct 2013 18:07:57 +0200 > Ricardo Ribalda escreveu: > >> vb2_fop_relase does not held the lock although it is modifying the >> queue->owner field. >> >> This could lead to race conditions on the vb2_perform_io function >> when multiple

Re: [PATCH v2] videobuf2: Add missing lock held on vb2_fop_relase

2013-10-31 Thread Mauro Carvalho Chehab
Em Sat, 19 Oct 2013 18:07:57 +0200 Ricardo Ribalda escreveu: > vb2_fop_relase does not held the lock although it is modifying the > queue->owner field. > > This could lead to race conditions on the vb2_perform_io function > when multiple applications are accessing the video device via > read/wri

Re: [PATCH v2] videobuf2: Add missing lock held on vb2_fop_relase

2013-10-29 Thread Ricardo Ribalda Delgado
Hello Anybody has a comment here? If not I will post a patch with the modifications propossed by Sylwester. Thanks! On Sat, Oct 19, 2013 at 10:08 PM, Ricardo Ribalda Delgado wrote: > Hello Sylwester > > > On Sat, Oct 19, 2013 at 8:27 PM, Sylwester Nawrocki > wrote: >> On 10/19/2013 06:07 PM,

Re: [PATCH v2] videobuf2: Add missing lock held on vb2_fop_relase

2013-10-19 Thread Ricardo Ribalda Delgado
Hello Sylwester On Sat, Oct 19, 2013 at 8:27 PM, Sylwester Nawrocki wrote: > On 10/19/2013 06:07 PM, Ricardo Ribalda wrote: > [...] >> >> --- >> drivers/media/platform/exynos4-is/fimc-capture.c | 2 +- >> drivers/media/platform/exynos4-is/fimc-lite.c| 2 +- >> drivers/media/usb/em28xx/

Re: [PATCH v2] videobuf2: Add missing lock held on vb2_fop_relase

2013-10-19 Thread Sylwester Nawrocki
On 10/19/2013 06:07 PM, Ricardo Ribalda wrote: [...] --- drivers/media/platform/exynos4-is/fimc-capture.c | 2 +- drivers/media/platform/exynos4-is/fimc-lite.c| 2 +- drivers/media/usb/em28xx/em28xx-video.c | 2 +- drivers/media/v4l2-core/videobuf2-core.c | 18 +++

[PATCH v2] videobuf2: Add missing lock held on vb2_fop_relase

2013-10-19 Thread Ricardo Ribalda
vb2_fop_relase does not held the lock although it is modifying the queue->owner field. This could lead to race conditions on the vb2_perform_io function when multiple applications are accessing the video device via read/write API: [ 308.297741] BUG: unable to handle kernel NULL pointer dereferenc