radio-mr800: fix radio->muted and radio->stereo
PATCH 1/1 radio-mr800: fix radio->muted and radio->stereo
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 <[email protected]> for pointing to this weak place in driver.
Signed-off-by Alexey Klimov <[email protected]>
--
linux/drivers/media/radio/radio-mr800.c +6 -6
@@ -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; }
Signature · 1 line
Best regards, Klimov Alexey