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] [thread-next>] [day] [month] [year] [list]
Message-ID: <1706035173.39231.1536414041437@email.1und1.de>
Date:   Sat, 8 Sep 2018 15:40:41 +0200 (CEST)
From:   Stefan Wahren <stefan.wahren@...e.com>
To:     Takashi Iwai <tiwai@...e.de>
Cc:     Eric Anholt <eric@...olt.net>,
        linux-rpi-kernel@...ts.infradead.org,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH 16/29] staging: bcm2835-audio: Drop superfluous mutex
 lock during prepare

Hi,

> Takashi Iwai <tiwai@...e.de> hat am 4. September 2018 um 17:58 geschrieben:
> 
> 
> The chip->audio_mutex is used basically for protecting the opened
> stream assignment, and the prepare callback is irrelevant with it.
> 
> Signed-off-by: Takashi Iwai <tiwai@...e.de>
> ---
>  drivers/staging/vc04_services/bcm2835-audio/bcm2835-pcm.c | 8 ++------
>  1 file changed, 2 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/staging/vc04_services/bcm2835-audio/bcm2835-pcm.c b/drivers/staging/vc04_services/bcm2835-audio/bcm2835-pcm.c
> index 1f9c940f1cc3..9659c25b9f9d 100644
> --- a/drivers/staging/vc04_services/bcm2835-audio/bcm2835-pcm.c
> +++ b/drivers/staging/vc04_services/bcm2835-audio/bcm2835-pcm.c
> @@ -218,8 +218,6 @@ static int snd_bcm2835_pcm_prepare(struct snd_pcm_substream *substream)
>  	int channels;
>  	int err;
>  
> -	mutex_lock(&chip->audio_mutex);
> -
>  	/* notify the vchiq that it should enter spdif passthrough mode by
>  	 * setting channels=0 (see
>  	 * https://github.com/raspberrypi/linux/issues/528)
> @@ -233,7 +231,7 @@ static int snd_bcm2835_pcm_prepare(struct snd_pcm_substream *substream)
>  				       runtime->rate,
>  				       snd_pcm_format_width(runtime->format));
>  	if (err < 0)
> -		goto out;
> +		return err;
>  
>  	memset(&alsa_stream->pcm_indirect, 0, sizeof(alsa_stream->pcm_indirect));
>  
> @@ -246,9 +244,7 @@ static int snd_bcm2835_pcm_prepare(struct snd_pcm_substream *substream)
>  	alsa_stream->pos = 0;
>  	alsa_stream->draining = false;
>  
> - out:
> -	mutex_unlock(&chip->audio_mutex);
> -	return err;
> +	return 0;

looks like your are removing code which has been added in patch #14 ?

>  }
>  
>  static void snd_bcm2835_pcm_transfer(struct snd_pcm_substream *substream,
> -- 
> 2.18.0
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ