Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: James Courtier-Dutton <James@superbug.demon.co.uk>
To: ALSA development <alsa-devel@alsa-project.org>
Subject: Re: [alsa-cvslog] CVS: alsa-kernel/core pcm_native.c,1.102,1.103
Date: Tue, 10 Aug 2004 23:48:04 +0100	[thread overview]
Message-ID: <411950A4.3070707@superbug.demon.co.uk> (raw)
In-Reply-To: <E1BuSw5-0008Ra-PX@sc8-pr-cvs1.sourceforge.net>

There is a bug in this patch!

Jaroslav Kysela wrote:
> Update of /cvsroot/alsa/alsa-kernel/core
> In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32435
> 
> Modified Files:
> 	pcm_native.c 
> Log Message:
> Serialize runtime->status->state access
> 
> Index: pcm_native.c
> ===================================================================
> RCS file: /cvsroot/alsa/alsa-kernel/core/pcm_native.c,v
> retrieving revision 1.102
> retrieving revision 1.103
> diff -u -r1.102 -r1.103
> --- pcm_native.c	27 Jul 2004 12:28:36 -0000	1.102
> +++ pcm_native.c	10 Aug 2004 09:28:45 -0000	1.103
<snip>
> @@ -473,11 +479,16 @@
>  static int snd_pcm_sw_params(snd_pcm_substream_t * substream, snd_pcm_sw_params_t *params)
>  {
>  	snd_pcm_runtime_t *runtime;
> +
>  	snd_assert(substream != NULL, return -ENXIO);
>  	runtime = substream->runtime;
>  	snd_assert(runtime != NULL, return -ENXIO);
> -	if (runtime->status->state == SNDRV_PCM_STATE_OPEN)

The following line should be "lock" and not "unlock"

> +	snd_pcm_stream_unlock_irq(substream);
> +	if (runtime->status->state == SNDRV_PCM_STATE_OPEN) {
> +		snd_pcm_stream_unlock_irq(substream);
>  		return -EBADFD;
> +	}
> +	snd_pcm_stream_unlock_irq(substream);
>  
>  	if (params->tstamp_mode > SNDRV_PCM_TSTAMP_LAST)
>  		return -EINVAL;
<snip>



-------------------------------------------------------
SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media
100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33
Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift.
http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285

           reply	other threads:[~2004-08-10 22:48 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <E1BuSw5-0008Ra-PX@sc8-pr-cvs1.sourceforge.net>]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=411950A4.3070707@superbug.demon.co.uk \
    --to=james@superbug.demon.co.uk \
    --cc=alsa-devel@alsa-project.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox