summaryrefslogtreecommitdiff
path: root/drivers/rtc
diff options
context:
space:
mode:
authorSakari Ailus <sakari.ailus@linux.intel.com>2018-11-05 09:35:44 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-11-27 16:13:08 +0100
commiteaa7def0549ee89f92e4e1b2627f1f4c7fa78bb4 (patch)
treebde354e17fb2e46b2b4e36419d2c1bbe8f2aebfe /drivers/rtc
parent88723e6ec53b135e6e4fde1e1336386fa358adc5 (diff)
media: v4l: event: Add subscription to list before calling "add" operation
commit 92539d3eda2c090b382699bbb896d4b54e9bdece upstream. Patch ad608fbcf166 changed how events were subscribed to address an issue elsewhere. As a side effect of that change, the "add" callback was called before the event subscription was added to the list of subscribed events, causing the first event queued by the add callback (and possibly other events arriving soon afterwards) to be lost. Fix this by adding the subscription to the list before calling the "add" callback, and clean up afterwards if that fails. Fixes: ad608fbcf166 ("media: v4l: event: Prevent freeing event subscriptions while accessed") Reported-by: Dave Stevenson <dave.stevenson@raspberrypi.org> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Tested-by: Dave Stevenson <dave.stevenson@raspberrypi.org> Reviewed-by: Hans Verkuil <hans.verkuil@cisco.com> Tested-by: Hans Verkuil <hans.verkuil@cisco.com> Cc: stable@vger.kernel.org (for 4.14 and up) Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/rtc')
0 files changed, 0 insertions, 0 deletions