Re: [PATCH 1/2] [media] media-device: Fix mutex handling code for ioctl

2016-03-29 Thread Mauro Carvalho Chehab
Em Tue, 29 Mar 2016 00:58:37 +0300 Sakari Ailus escreveu: > Hi Mauro, > > Please see the comments below. > > On Mon, Mar 28, 2016 at 03:11:03PM -0300, Mauro Carvalho Chehab wrote: > > Remove two nested mutex left-overs at find_entity and make sure > > that the code won't suffer race conditions

Re: [PATCH 1/2] [media] media-device: Fix mutex handling code for ioctl

2016-03-28 Thread Sakari Ailus
Hi Mauro, Please see the comments below. On Mon, Mar 28, 2016 at 03:11:03PM -0300, Mauro Carvalho Chehab wrote: > Remove two nested mutex left-overs at find_entity and make sure > that the code won't suffer race conditions if the device is > being removed while ioctl is being handled nor the topo

[PATCH 1/2] [media] media-device: Fix mutex handling code for ioctl

2016-03-28 Thread Mauro Carvalho Chehab
Remove two nested mutex left-overs at find_entity and make sure that the code won't suffer race conditions if the device is being removed while ioctl is being handled nor the topology changes, by protecting all ioctls with a mutex at media_device_ioctl(). As reported by Laurent, commit c38077d39c7