diff options
author | Hans Verkuil <hverkuil@xs4all.nl> | 2008-07-26 09:01:24 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2008-07-27 11:06:23 -0300 |
commit | 1052efe0fc69130d9d6a44bc9ceecd229221d9a1 (patch) | |
tree | 7e7f19cbbd3ff023e80eb7da5b68469085bdfe59 /drivers/media/video/saa7134/saa7134.h | |
parent | feb75f07102a85026d41e2c4e4113c34dd035c30 (diff) | |
download | lwn-1052efe0fc69130d9d6a44bc9ceecd229221d9a1.tar.gz lwn-1052efe0fc69130d9d6a44bc9ceecd229221d9a1.zip |
V4L/DVB (8505): saa7134-empress.c: fix deadlock
ts_release() locked a mutex that videobuf_stop() also tried to obtain.
But ts_release() shouldn't hold that mutex at all.
Make empress_users atomic as well to prevent possible race condition.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/video/saa7134/saa7134.h')
-rw-r--r-- | drivers/media/video/saa7134/saa7134.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/video/saa7134/saa7134.h b/drivers/media/video/saa7134/saa7134.h index ade4e19799e9..ed20dd56379c 100644 --- a/drivers/media/video/saa7134/saa7134.h +++ b/drivers/media/video/saa7134/saa7134.h @@ -561,7 +561,7 @@ struct saa7134_dev { /* SAA7134_MPEG_EMPRESS only */ struct video_device *empress_dev; struct videobuf_queue empress_tsq; - unsigned int empress_users; + atomic_t empress_users; struct work_struct empress_workqueue; int empress_started; |