lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Tue, 15 Sep 2015 14:01:54 +0300 From: Sakari Ailus <sakari.ailus@...ux.intel.com> To: Javier Martinez Canillas <javier@....samsung.com>, linux-kernel@...r.kernel.org Cc: Luis de Bethencourt <luis@...ethencourt.com>, linux-sh@...r.kernel.org, Sylwester Nawrocki <s.nawrocki@...sung.com>, Sören Brinkmann <soren.brinkmann@...inx.com>, linux-samsung-soc@...r.kernel.org, Hyun Kwon <hyun.kwon@...inx.com>, Matthias Schwarzott <zzam@...too.org>, Kyungmin Park <kyungmin.park@...sung.com>, Tommi Rantala <tt.rantala@...il.com>, Laurent Pinchart <laurent.pinchart@...asonboard.com>, Hans Verkuil <hans.verkuil@...co.com>, linux-media@...r.kernel.org, Kukjin Kim <kgene@...nel.org>, Krzysztof Kozlowski <k.kozlowski@...sung.com>, Mauro Carvalho Chehab <mchehab@....samsung.com>, Michal Simek <michal.simek@...inx.com>, Olli Salonen <olli.salonen@....fi>, linux-arm-kernel@...ts.infradead.org, Stefan Richter <stefanr@...6.in-berlin.de>, Antti Palosaari <crope@....fi>, Shuah Khan <shuahkh@....samsung.com>, Rafael Lourenço de Lima Chehab <chehabrafael@...il.com> Subject: Re: [PATCH v4 2/2] [media] media-device: split media initialization and registration Hi Javier, Javier Martinez Canillas wrote: > The media device node is registered and so made visible to user-space > before entities are registered and links created which means that the > media graph obtained by user-space could be only partially enumerated > if that happens too early before all the graph has been created. > > To avoid this race condition, split the media init and registration > in separate functions and only register the media device node when > all the pending subdevices have been registered, either explicitly > by the driver or asynchronously using v4l2_async_register_subdev(). > > The media_device_register() had a check for drivers not filling dev > and model fields but all drivers in mainline set them and not doing > it will be a driver bug so change the function return to void and > add a BUG_ON() for dev being NULL instead. > > Also, add a media_device_cleanup() function that will destroy the > graph_mutex that is initialized in media_device_init(). > > Suggested-by: Sakari Ailus <sakari.ailus@...ux.intel.com> > Signed-off-by: Javier Martinez Canillas <javier@....samsung.com> Thanks! For drivers/media/media-device.c, drivers/media/platform/omap3isp/isp.c and include/media/media-device.h: Acked-by: Sakari Ailus <sakari.ailus@...ux.intel.com> Laurent, could you ack these if you're fine with them? They depend on Mauro's patches so they should be applied after them. -- Kind regards, Sakari Ailus sakari.ailus@...ux.intel.com -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@...r.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists