From: Alexey Klimov <klimov.linux@gmail.com>
To: Mauro Carvalho Chehab <mchehab@infradead.org>,
Douglas Schilling Landgraf <dougsland@gmail.com>
Cc: linux-media@vger.kernel.org
Subject: [PATCH] radio-mr800: fix radio->muted and radio->stereo
Date: Sat, 24 Jan 2009 08:07:04 +0300 [thread overview]
Message-ID: <1232773624.6320.17.camel@tux.localhost> (raw)
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
reply other threads:[~2009-01-24 5:06 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1232773624.6320.17.camel@tux.localhost \
--to=klimov.linux@gmail.com \
--cc=dougsland@gmail.com \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.