lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <412bdbff0904301454x46fb9de5hbe8f7d67da7bf887@mail.gmail.com>
Date:	Thu, 30 Apr 2009 17:54:39 -0400
From:	Devin Heitmueller <devin.heitmueller@...il.com>
To:	Andrew Morton <akpm@...ux-foundation.org>
Cc:	Simon Arlott <simon@...e.lp0.eu>, linux-kernel@...r.kernel.org,
	mchehab@...radead.org, linux-media@...r.kernel.org
Subject: Re: [PATCH] dvb-core: Fix potential mutex_unlock without mutex_lock 
	in dvb_dvr_read

On Thu, Apr 30, 2009 at 5:48 PM, Andrew Morton
<akpm@...ux-foundation.org> wrote:
> On Thu, 30 Apr 2009 22:42:06 +0100
> Simon Arlott <simon@...e.lp0.eu> wrote:
>
>> >> diff --git a/drivers/media/dvb/dvb-core/dmxdev.c b/drivers/media/dvb/dvb-core/dmxdev.c
>> >> index c35fbb8..d6d098a 100644
>> >> --- a/drivers/media/dvb/dvb-core/dmxdev.c
>> >> +++ b/drivers/media/dvb/dvb-core/dmxdev.c
>> >> @@ -247,7 +247,7 @@ static ssize_t dvb_dvr_read(struct file *file, char __user *buf, size_t count,
>> >>    int ret;
>> >>
>> >>    if (dmxdev->exit) {
>> >> -          mutex_unlock(&dmxdev->mutex);
>> >> +          //mutex_unlock(&dmxdev->mutex);
>> >>            return -ENODEV;
>> >>    }
>> >
>> > Is there any value in retaining all the commented-out lock operations,
>> > or can we zap 'em?
>>
>> I'm assuming they should really be there - it's just not practical
>> because the call to dvb_dmxdev_buffer_read is likely to block waiting
>> for data.
>
> well..  such infomation is much better communicated via a nice comment,
> rather than mystery-dead-code?

I'm doing some review of the locking in dvb core as a result of a race
condition I found earlier in the week.  I'll take a look at this too
when I get a few minutes.

Devin

-- 
Devin J. Heitmueller
http://www.devinheitmueller.com
AIM: devinheitmueller
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ