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: <CACVXFVMHecbxaGWe6-EeF-sDXRx0GnPHb4shRYOQxUXPbRMyGg@mail.gmail.com>
Date:	Sat, 27 Jul 2013 17:34:07 +0800
From:	Ming Lei <ming.lei@...onical.com>
To:	Hans Verkuil <hverkuil@...all.nl>
Cc:	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	linux-usb@...r.kernel.org, Oliver Neukum <oliver@...kum.org>,
	Alan Stern <stern@...land.harvard.edu>,
	linux-input@...r.kernel.org, linux-bluetooth@...r.kernel.org,
	netdev@...r.kernel.org, linux-wireless@...r.kernel.org,
	linux-media@...r.kernel.org, alsa-devel@...a-project.org,
	Mauro Carvalho Chehab <mchehab@...hat.com>,
	Hans Verkuil <hans.verkuil@...co.com>
Subject: Re: [PATCH 35/50] media: usb: cx231xx: spin_lock in complete() cleanup

On Fri, Jul 26, 2013 at 10:28 PM, Hans Verkuil <hverkuil@...all.nl> wrote:
>
>
> On 07/11/2013 11:05 AM, Ming Lei wrote:
>> Complete() will be run with interrupt enabled, so change to
>> spin_lock_irqsave().
>>
>> Cc: Mauro Carvalho Chehab <mchehab@...hat.com>
>> Cc: Hans Verkuil <hans.verkuil@...co.com>
>> Cc: linux-media@...r.kernel.org
>> Signed-off-by: Ming Lei <ming.lei@...onical.com>
>> ---
>>  drivers/media/usb/cx231xx/cx231xx-audio.c |    6 ++++++
>>  drivers/media/usb/cx231xx/cx231xx-core.c  |   10 ++++++----
>>  drivers/media/usb/cx231xx/cx231xx-vbi.c   |    5 +++--
>>  3 files changed, 15 insertions(+), 6 deletions(-)
>>
>> diff --git a/drivers/media/usb/cx231xx/cx231xx-audio.c b/drivers/media/usb/cx231xx/cx231xx-audio.c
>> index 81a1d97..58c1b5c 100644
>> --- a/drivers/media/usb/cx231xx/cx231xx-audio.c
>> +++ b/drivers/media/usb/cx231xx/cx231xx-audio.c
>> @@ -136,6 +136,7 @@ static void cx231xx_audio_isocirq(struct urb *urb)
>>               stride = runtime->frame_bits >> 3;
>>
>>               for (i = 0; i < urb->number_of_packets; i++) {
>> +                     unsigned long flags;
>>                       int length = urb->iso_frame_desc[i].actual_length /
>>                                    stride;
>>                       cp = (unsigned char *)urb->transfer_buffer +
>> @@ -158,6 +159,7 @@ static void cx231xx_audio_isocirq(struct urb *urb)
>>                                      length * stride);
>>                       }
>>
>> +                     local_irq_save(flags);
>>                       snd_pcm_stream_lock(substream);
>
> Can't you use snd_pcm_stream_lock_irqsave here?

Sure, that is already in my mind, :-)

> Ditto for the other media drivers where this happens: em28xx and tlg2300.

Yes.

>
> I've reviewed the media driver changes and they look OK to me, so if
> my comment above is fixed, then I can merge them for 3.12. Or are these
> changes required for 3.11?

These are for 3.12.

I will send out v2 next week, and thanks for your review.

Thanks,
--
Ming Lei
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ