summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/zoran_card.h
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@infradead.org>2008-06-22 17:03:02 +0000
committerMauro Carvalho Chehab <mchehab@infradead.org>2008-06-22 17:03:02 +0000
commit495e488de4078579da14b32520fb766177ccf8cf (patch)
treef43a102908d802deccdc44f3397187f6e1322a8e /linux/drivers/media/video/zoran_card.h
parent4cee5ccd8ff1a64334599e8c317ab04289dfa1f2 (diff)
downloadmediapointer-dvb-s2-495e488de4078579da14b32520fb766177ccf8cf.tar.gz
mediapointer-dvb-s2-495e488de4078579da14b32520fb766177ccf8cf.tar.bz2
Fix open/close race in saa7134
From: Arjan van de Ven <arjan@linux.intel.com> The saa7134 driver uses a (non-atomic) variable in an attempt to only allow one opener of the device (how it deals with sending the fd over unix sockets I don't know). Unfortunately, the release function first decrements this variable, and THEN goes on to disable more of the device. This allows for a race where another opener of the device comes in after the decrement of the variable, configures the hardware just to then see the hardware be disabled by the rest of the release function. This patch makes the release function use the same lock as the open function to protect the hardware as well as the variable (which now at least has some locking to protect it). Signed-off-by: Arjan van de Ven <arjan@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'linux/drivers/media/video/zoran_card.h')
0 files changed, 0 insertions, 0 deletions