[PATCH] fix of mutex locking bug in fops_read

2011-03-14 Thread Tobias Lorenz
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.faer...@kernelconcepts.de
Acked-by: Tobias Lorenz tobias.lor...@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


--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] fix of mutex locking bug in fops_read

2011-03-14 Thread Kyungmin Park
Acked-by: Kyungmin Park kyungmin.p...@samsung.com

On Tue, Mar 15, 2011 at 6:03 AM, Tobias Lorenz tobias.lor...@gmx.net wrote:
 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.faer...@kernelconcepts.de
 Acked-by: Tobias Lorenz tobias.lor...@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


 --
 To unsubscribe from this list: send the line unsubscribe linux-media in
 the body of a message to majord...@vger.kernel.org
 More majordomo info at  http://vger.kernel.org/majordomo-info.html

--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html