Re: [PATCH 1/1] v4l: event: Prevent freeing event subscriptions while accessed

2018-09-12 Thread Sakari Ailus
Hi Laurent, On Wed, Sep 12, 2018 at 02:57:20PM +0300, Laurent Pinchart wrote: > Hello, > > On Wednesday, 12 September 2018 13:00:57 EEST Sakari Ailus wrote: > > On Wed, Sep 12, 2018 at 11:27:35AM +0200, Hans Verkuil wrote: > > > On 09/12/18 10:52, Sakari Ailus wrote: > > >> The event subscription

Re: [PATCH 1/1] v4l: event: Prevent freeing event subscriptions while accessed

2018-09-12 Thread Sakari Ailus
Hi Hans, On Wed, Sep 12, 2018 at 02:32:52PM +0200, Hans Verkuil wrote: > On 09/12/18 12:00, Sakari Ailus wrote: > > Hi Hans, > > > > Thanks for the quick review. > > > > On Wed, Sep 12, 2018 at 11:27:35AM +0200, Hans Verkuil wrote: > >> On 09/12/18 10:52, Sakari Ailus wrote: > >>> The event subs

Re: [PATCH 1/1] v4l: event: Prevent freeing event subscriptions while accessed

2018-09-12 Thread Hans Verkuil
On 09/12/18 12:00, Sakari Ailus wrote: > Hi Hans, > > Thanks for the quick review. > > On Wed, Sep 12, 2018 at 11:27:35AM +0200, Hans Verkuil wrote: >> On 09/12/18 10:52, Sakari Ailus wrote: >>> The event subscriptions are added to the subscribed event list while >>> holding a spinlock, but that

Re: [PATCH 1/1] v4l: event: Prevent freeing event subscriptions while accessed

2018-09-12 Thread Laurent Pinchart
Hello, On Wednesday, 12 September 2018 13:00:57 EEST Sakari Ailus wrote: > On Wed, Sep 12, 2018 at 11:27:35AM +0200, Hans Verkuil wrote: > > On 09/12/18 10:52, Sakari Ailus wrote: > >> The event subscriptions are added to the subscribed event list while > >> holding a spinlock, but that lock is su

Re: [PATCH 1/1] v4l: event: Prevent freeing event subscriptions while accessed

2018-09-12 Thread Sakari Ailus
Hi Hans, Thanks for the quick review. On Wed, Sep 12, 2018 at 11:27:35AM +0200, Hans Verkuil wrote: > On 09/12/18 10:52, Sakari Ailus wrote: > > The event subscriptions are added to the subscribed event list while > > holding a spinlock, but that lock is subsequently released while still > > acce

Re: [PATCH 1/1] v4l: event: Prevent freeing event subscriptions while accessed

2018-09-12 Thread Hans Verkuil
On 09/12/18 10:52, Sakari Ailus wrote: > The event subscriptions are added to the subscribed event list while > holding a spinlock, but that lock is subsequently released while still > accessing the subscription object. This makes it possible to unsubscribe > the event --- and freeing the subscript

[PATCH 1/1] v4l: event: Prevent freeing event subscriptions while accessed

2018-09-12 Thread Sakari Ailus
The event subscriptions are added to the subscribed event list while holding a spinlock, but that lock is subsequently released while still accessing the subscription object. This makes it possible to unsubscribe the event --- and freeing the subscription object's memory --- while the subscription