Re: [PATCH 2/2] [media] media-device: dynamically allocate struct media_devnode

2016-06-09 Thread Sakari Ailus
Hi Mauro, On Tue, Jun 07, 2016 at 10:11:33AM -0300, Mauro Carvalho Chehab wrote: > Em Mon, 6 Jun 2016 17:13:12 -0600 > Shuah Khan escreveu: > > > > A few general comments on the patch --- I agree we've had the problem from > > > the day one, but it's really started

Re: [PATCH 2/2] [media] media-device: dynamically allocate struct media_devnode

2016-06-07 Thread Mauro Carvalho Chehab
Em Mon, 6 Jun 2016 17:13:12 -0600 Shuah Khan escreveu: > > A few general comments on the patch --- I agree we've had the problem from > > the day one, but it's really started showing up recently. I agree with the > > taken approach of separating the lifetimes of both

Re: [PATCH 2/2] [media] media-device: dynamically allocate struct media_devnode

2016-06-06 Thread Shuah Khan
Hi Sakari, On 06/06/2016 02:45 AM, Sakari Ailus wrote: > Hi Mauro, > > On Sat, May 07, 2016 at 12:12:09PM -0300, Mauro Carvalho Chehab wrote: >> struct media_devnode is currently embedded at struct media_device. >> >> While this works fine during normal usage, it leads to a race >> condition

Re: [PATCH 2/2] [media] media-device: dynamically allocate struct media_devnode

2016-06-06 Thread Sakari Ailus
Hi Mauro, On Sat, May 07, 2016 at 12:12:09PM -0300, Mauro Carvalho Chehab wrote: > struct media_devnode is currently embedded at struct media_device. > > While this works fine during normal usage, it leads to a race > condition during devnode unregister. the problem is that drivers > assume

Re: [PATCH 2/2] [media] media-device: dynamically allocate struct media_devnode

2016-05-09 Thread Shuah Khan
On 05/09/2016 09:03 AM, Mauro Carvalho Chehab wrote: > Em Mon, 9 May 2016 14:40:02 +0300 > Laurent Pinchart escreveu: > >> Hi Mauro, >> >> Thank you for the patch. >> >> On Saturday 07 May 2016 12:12:09 Mauro Carvalho Chehab wrote: >>> struct media_devnode is

Re: [PATCH 2/2] [media] media-device: dynamically allocate struct media_devnode

2016-05-09 Thread Mauro Carvalho Chehab
Em Mon, 9 May 2016 14:40:02 +0300 Laurent Pinchart escreveu: > Hi Mauro, > > Thank you for the patch. > > On Saturday 07 May 2016 12:12:09 Mauro Carvalho Chehab wrote: > > struct media_devnode is currently embedded at struct media_device. > > s/at/in/ > >

Re: [PATCH 2/2] [media] media-device: dynamically allocate struct media_devnode

2016-05-09 Thread Laurent Pinchart
Hi Mauro, Thank you for the patch. On Saturday 07 May 2016 12:12:09 Mauro Carvalho Chehab wrote: > struct media_devnode is currently embedded at struct media_device. s/at/in/ > While this works fine during normal usage, it leads to a race > condition during devnode unregister. Strictly

[PATCH 2/2] [media] media-device: dynamically allocate struct media_devnode

2016-05-07 Thread Mauro Carvalho Chehab
struct media_devnode is currently embedded at struct media_device. While this works fine during normal usage, it leads to a race condition during devnode unregister. the problem is that drivers assume that, after calling media_device_unregister(), the struct that contains media_device can be