Re: [PATCH 1/1] media: Set entity->links NULL in cleanup

2014-09-26 Thread Laurent Pinchart
Hi Sakari, On Wednesday 24 September 2014 12:17:45 Sakari Ailus wrote: > Hi Laurent, > > Oops. this got buried in my inbox... > > Laurent Pinchart wrote: > > On Thursday 17 July 2014 14:53:49 Sakari Ailus wrote: > >> On Thu, Jul 17, 2014 at 01:43:09PM +0200, Laurent Pinchart wrote: > >>> On Tues

Re: [PATCH 1/1] media: Set entity->links NULL in cleanup

2014-09-24 Thread Sakari Ailus
Hi Laurent, Oops. this got buried in my inbox... Laurent Pinchart wrote: On Thursday 17 July 2014 14:53:49 Sakari Ailus wrote: On Thu, Jul 17, 2014 at 01:43:09PM +0200, Laurent Pinchart wrote: On Tuesday 27 May 2014 16:27:49 Sakari Ailus wrote: Calling media_entity_cleanup() on a cleaned-up

Re: [PATCH 1/1] media: Set entity->links NULL in cleanup

2014-07-17 Thread Laurent Pinchart
On Thursday 17 July 2014 14:53:49 Sakari Ailus wrote: > On Thu, Jul 17, 2014 at 01:43:09PM +0200, Laurent Pinchart wrote: > > On Tuesday 27 May 2014 16:27:49 Sakari Ailus wrote: > > > Calling media_entity_cleanup() on a cleaned-up entity would result into > > > double free of the entity->links poin

Re: [PATCH 1/1] media: Set entity->links NULL in cleanup

2014-07-17 Thread Sakari Ailus
Hi Laurent, On Thu, Jul 17, 2014 at 01:43:09PM +0200, Laurent Pinchart wrote: > On Tuesday 27 May 2014 16:27:49 Sakari Ailus wrote: > > Calling media_entity_cleanup() on a cleaned-up entity would result into > > double free of the entity->links pointer and likely memory corruption as > > well. >

Re: [PATCH 1/1] media: Set entity->links NULL in cleanup

2014-07-17 Thread Laurent Pinchart
Hi Sakari, Thank you for the patch. On Tuesday 27 May 2014 16:27:49 Sakari Ailus wrote: > Calling media_entity_cleanup() on a cleaned-up entity would result into > double free of the entity->links pointer and likely memory corruption as > well. My first question is, why would anyone do that ? :-

[PATCH 1/1] media: Set entity->links NULL in cleanup

2014-05-27 Thread Sakari Ailus
Calling media_entity_cleanup() on a cleaned-up entity would result into double free of the entity->links pointer and likely memory corruption as well. Setting entity->links as NULL right after the kfree() avoids this. Signed-off-by: Sakari Ailus --- drivers/media/media-entity.c | 1 + 1 file cha