All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tobias Lorenz <tobias.lorenz@gmx.net>
To: <mchehab@infradead.org>
Cc: Nils Faerber <nils.faerber@kernelconcepts.de>,
	<linux-media@vger.kernel.org>
Subject: [PATCH] fix of mutex locking bug in fops_read
Date: Mon, 14 Mar 2011 22:03:40 +0100	[thread overview]
Message-ID: <28773e810fb3efb9dc0a9cc683a2268f@localhost> (raw)

This patch fixes a mutex locking bug causing userspace processes
to hang indefinitely upon reading the radio device for RDS data.

Signed-off-by: Nils Faerber <nils.faerber@kernelconcepts.de>
Acked-by: Tobias Lorenz <tobias.lorenz@gmx.net>
---
 drivers/media/radio/si470x/radio-si470x-common.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/drivers/media/radio/si470x/radio-si470x-common.c
b/drivers/media/radio/si470x/radio-si470x-common.c
index 4c69698..41ee757 100644
--- a/drivers/media/radio/si470x/radio-si470x-common.c
+++ b/drivers/media/radio/si470x/radio-si470x-common.c
@@ -483,7 +483,6 @@ static ssize_t si470x_fops_read(struct file *file,
char __user *buf,
 	count /= 3;
 
 	/* copy RDS block out of internal buffer and to user buffer */
-	mutex_lock(&radio->lock);
 	while (block_count < count) {
 		if (radio->rd_index == radio->wr_index)
 			break;
-- 
1.7.2.3



             reply	other threads:[~2011-03-14 21:03 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-14 21:03 Tobias Lorenz [this message]
2011-03-15  5:18 ` [PATCH] fix of mutex locking bug in fops_read Kyungmin Park

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=28773e810fb3efb9dc0a9cc683a2268f@localhost \
    --to=tobias.lorenz@gmx.net \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@infradead.org \
    --cc=nils.faerber@kernelconcepts.de \
    /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.