summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-10-03 04:23:46 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-10-03 04:23:46 -0700
commit6bebe37927f3023e92de66964df8ff75151dcea9 (patch)
tree8534913e1b402ddc7ff93f5bdd123a4dc7d6577a /include
parent5b372600ccf1116701e96cf593559a60c9bee7e0 (diff)
parentad608fbcf166fec809e402d548761768f602702c (diff)
downloadlinux-6bebe37927f3023e92de66964df8ff75151dcea9.tar.bz2
Merge tag 'media/v4.19-3' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media
Mauro writes: "media fixes for v4.19-rc6" * tag 'media/v4.19-3' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: media: v4l: event: Prevent freeing event subscriptions while accessed
Diffstat (limited to 'include')
-rw-r--r--include/media/v4l2-fh.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/media/v4l2-fh.h b/include/media/v4l2-fh.h
index ea73fef8bdc0..8586cfb49828 100644
--- a/include/media/v4l2-fh.h
+++ b/include/media/v4l2-fh.h
@@ -38,10 +38,13 @@ struct v4l2_ctrl_handler;
* @prio: priority of the file handler, as defined by &enum v4l2_priority
*
* @wait: event' s wait queue
+ * @subscribe_lock: serialise changes to the subscribed list; guarantee that
+ * the add and del event callbacks are orderly called
* @subscribed: list of subscribed events
* @available: list of events waiting to be dequeued
* @navailable: number of available events at @available list
* @sequence: event sequence number
+ *
* @m2m_ctx: pointer to &struct v4l2_m2m_ctx
*/
struct v4l2_fh {
@@ -52,6 +55,7 @@ struct v4l2_fh {
/* Events */
wait_queue_head_t wait;
+ struct mutex subscribe_lock;
struct list_head subscribed;
struct list_head available;
unsigned int navailable;