summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/saa7134/saa7134.h
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil@xs4all.nl>2008-07-26 14:01:24 +0200
committerHans Verkuil <hverkuil@xs4all.nl>2008-07-26 14:01:24 +0200
commite791213b73718f65586a29d8cf7945fefd188429 (patch)
treea8d4c436f67b18c3e05ca65ceae8989a76c30cab /linux/drivers/media/video/saa7134/saa7134.h
parentddb6d77848776ec7f6b3135f2dfa5fbc1544b003 (diff)
downloadmediapointer-dvb-s2-e791213b73718f65586a29d8cf7945fefd188429.tar.gz
mediapointer-dvb-s2-e791213b73718f65586a29d8cf7945fefd188429.tar.bz2
saa7134-empress.c: fix deadlock
From: Hans Verkuil <hverkuil@xs4all.nl> 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>
Diffstat (limited to 'linux/drivers/media/video/saa7134/saa7134.h')
-rw-r--r--linux/drivers/media/video/saa7134/saa7134.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/linux/drivers/media/video/saa7134/saa7134.h b/linux/drivers/media/video/saa7134/saa7134.h
index 053c358ff..9acb601c2 100644
--- a/linux/drivers/media/video/saa7134/saa7134.h
+++ b/linux/drivers/media/video/saa7134/saa7134.h
@@ -566,7 +566,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;