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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <51DEAEDB.2060600@cogentembedded.com>
Date:	Thu, 11 Jul 2013 17:10:51 +0400
From:	Sergei Shtylyov <sergei.shtylyov@...entembedded.com>
To:	Ming Lei <ming.lei@...onical.com>
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,
	Clemens Ladisch <clemens@...isch.de>,
	Jaroslav Kysela <perex@...ex.cz>, Takashi Iwai <tiwai@...e.de>
Subject: Re: [PATCH 46/50] Sound: usb: ua101: spin_lock in complete() cleanup

On 11-07-2013 13:06, Ming Lei wrote:

    Here the subject doesn't match the patch.

> Complete() will be run with interrupt enabled, so disable local
> interrupt before holding a global lock which is held without irqsave.

> Cc: Clemens Ladisch <clemens@...isch.de>
> Cc: Jaroslav Kysela <perex@...ex.cz>
> Cc: Takashi Iwai <tiwai@...e.de>
> Cc: alsa-devel@...a-project.org
> Signed-off-by: Ming Lei <ming.lei@...onical.com>
> ---
>   sound/usb/misc/ua101.c |   14 ++++++++++++--
>   1 file changed, 12 insertions(+), 2 deletions(-)

> diff --git a/sound/usb/misc/ua101.c b/sound/usb/misc/ua101.c
> index 8b5d2c5..52a60c6 100644
> --- a/sound/usb/misc/ua101.c
> +++ b/sound/usb/misc/ua101.c
> @@ -613,14 +613,24 @@ static int start_usb_playback(struct ua101 *ua)
>
>   static void abort_alsa_capture(struct ua101 *ua)
>   {
> -	if (test_bit(ALSA_CAPTURE_RUNNING, &ua->states))
> +	if (test_bit(ALSA_CAPTURE_RUNNING, &ua->states)) {
> +		unsigned long flags;
> +
> +		local_irq_save(flags);
>   		snd_pcm_stop(ua->capture.substream, SNDRV_PCM_STATE_XRUN);
> +		local_irq_restore(flags);
> +	}
>   }
>
>   static void abort_alsa_playback(struct ua101 *ua)
>   {
> -	if (test_bit(ALSA_PLAYBACK_RUNNING, &ua->states))
> +	if (test_bit(ALSA_PLAYBACK_RUNNING, &ua->states)) {
> +		unsigned long flags;
> +
> +		local_irq_save(flags);
>   		snd_pcm_stop(ua->playback.substream, SNDRV_PCM_STATE_XRUN);
> +		local_irq_restore(flags);
> +	}
>   }

WBR, Sergei

--
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