* [PATCH] radio-mr800: fix radio->muted and radio->stereo
@ 2009-01-24 5:07 Alexey Klimov
0 siblings, 0 replies; only message in thread
From: Alexey Klimov @ 2009-01-24 5:07 UTC (permalink / raw)
To: Mauro Carvalho Chehab, Douglas Schilling Landgraf; +Cc: linux-media
Hello, Mauro
This is simple fix for mr800 usb radio driver.
It would be great to have it in next upstream pull request if you don't
mind.
---
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.
Signed-off-by: Alexey Klimov <klimov.linux@gmail.com>
--
diff -r 6a6eb9efc6cd linux/drivers/media/radio/radio-mr800.c
--- a/linux/drivers/media/radio/radio-mr800.c Fri Jan 23 22:35:12 2009 -0200
+++ b/linux/drivers/media/radio/radio-mr800.c Sat Jan 24 07:22:38 2009 +0300
@@ -197,9 +197,9 @@
return retval;
}
+ radio->muted = 0;
+
mutex_unlock(&radio->lock);
-
- radio->muted = 0;
return retval;
}
@@ -233,9 +233,9 @@
return retval;
}
+ radio->muted = 1;
+
mutex_unlock(&radio->lock);
-
- radio->muted = 1;
return retval;
}
@@ -287,9 +287,9 @@
return retval;
}
+ radio->stereo = 0;
+
mutex_unlock(&radio->lock);
-
- radio->stereo = 0;
return retval;
}
--
Best regards, Klimov Alexey
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2009-01-24 5:06 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-24 5:07 [PATCH] radio-mr800: fix radio->muted and radio->stereo Alexey Klimov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox