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]
Date:	Mon, 19 Jan 2015 10:53:55 +0100
From:	Jiri Slaby <jslaby@...e.cz>
To:	Takashi Iwai <tiwai@...e.de>
CC:	linux-kernel@...r.kernel.org, Jaroslav Kysela <perex@...ex.cz>,
	alsa-devel@...a-project.org
Subject: Re: [PATCH 3/3] sound: dummy, avoid races with timer

On 01/19/2015, 10:49 AM, Takashi Iwai wrote:
>> @@ -322,12 +325,14 @@ static snd_pcm_uframes_t
>>  dummy_systimer_pointer(struct snd_pcm_substream *substream)
>>  {
>>  	struct dummy_systimer_pcm *dpcm = substream->runtime->private_data;
>> +	unsigned long flags;
>>  	snd_pcm_uframes_t pos;
>>  
>> -	spin_lock(&dpcm->lock);
>> +	spin_lock_irqsave(&dpcm->lock, flags);
>>  	dummy_systimer_update(dpcm);
>>  	pos = dpcm->frac_pos / HZ;
>> -	spin_unlock(&dpcm->lock);
>> +	spin_unlock_irqrestore(&dpcm->lock, flags);
>> +
> 
> This chunk is superfluous.  The pointer callback is guaranteed to be
> called in the irq-disabled context.

Oh, my bad, I was looking at snd_compr_ops->pointer which is not the case.

-- 
js
suse labs
--
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