public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] fix of mutex locking bug in fops_read
@ 2011-03-14 21:03 Tobias Lorenz
  2011-03-15  5:18 ` Kyungmin Park
  0 siblings, 1 reply; 2+ messages in thread
From: Tobias Lorenz @ 2011-03-14 21:03 UTC (permalink / raw)
  To: mchehab; +Cc: Nils Faerber, linux-media

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



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] fix of mutex locking bug in fops_read
  2011-03-14 21:03 [PATCH] fix of mutex locking bug in fops_read Tobias Lorenz
@ 2011-03-15  5:18 ` Kyungmin Park
  0 siblings, 0 replies; 2+ messages in thread
From: Kyungmin Park @ 2011-03-15  5:18 UTC (permalink / raw)
  To: Tobias Lorenz; +Cc: mchehab, Nils Faerber, linux-media

Acked-by: Kyungmin Park <kyungmin.park@samsung.com>

On Tue, Mar 15, 2011 at 6:03 AM, Tobias Lorenz <tobias.lorenz@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.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
>
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-media" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-03-15  5:18 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-14 21:03 [PATCH] fix of mutex locking bug in fops_read Tobias Lorenz
2011-03-15  5:18 ` Kyungmin Park

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox