diff options
author | Douglas Schilling Landgraf <dougsland@redhat.com> | 2009-01-25 21:07:28 -0200 |
---|---|---|
committer | Douglas Schilling Landgraf <dougsland@redhat.com> | 2009-01-25 21:07:28 -0200 |
commit | 5a1184d7147ed7f62ac148a6fd5b414fd6fae7ee (patch) | |
tree | 23c466ea5fd1e26f28fb1d93ce0daac0e58b8f89 /linux/drivers/media/radio/radio-mr800.c | |
parent | d7274e08881bc13ea807d8c6c91f8461aadfdcdb (diff) | |
download | mediapointer-dvb-s2-5a1184d7147ed7f62ac148a6fd5b414fd6fae7ee.tar.gz mediapointer-dvb-s2-5a1184d7147ed7f62ac148a6fd5b414fd6fae7ee.tar.bz2 |
radio-mr800: fix radio->muted and radio->stereo
From: Alexey Klimov <klimov.linux@gmail.com>
Move radio->muted and radio->stereo in section where radio mutex is
locked to avoid possible race condition problems or access to memory.
Thanks to David Ellingsworth <david@identd.dyndns.org> for pointing to
this weak place in driver.
Priority: high
Signed-off-by: Alexey Klimov <klimov.linux@gmail.com>
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Diffstat (limited to 'linux/drivers/media/radio/radio-mr800.c')
-rw-r--r-- | linux/drivers/media/radio/radio-mr800.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/linux/drivers/media/radio/radio-mr800.c b/linux/drivers/media/radio/radio-mr800.c index ebd10cb2e..4aa51a282 100644 --- a/linux/drivers/media/radio/radio-mr800.c +++ b/linux/drivers/media/radio/radio-mr800.c @@ -197,10 +197,10 @@ static int amradio_start(struct amradio_device *radio) return retval; } - mutex_unlock(&radio->lock); - radio->muted = 0; + mutex_unlock(&radio->lock); + return retval; } @@ -233,10 +233,10 @@ static int amradio_stop(struct amradio_device *radio) return retval; } - mutex_unlock(&radio->lock); - radio->muted = 1; + mutex_unlock(&radio->lock); + return retval; } @@ -287,10 +287,10 @@ static int amradio_setfreq(struct amradio_device *radio, int freq) return retval; } - mutex_unlock(&radio->lock); - radio->stereo = 0; + mutex_unlock(&radio->lock); + return retval; } |