From: Takashi Iwai Subject: Re: Is locking problem in snd_intel8x0_pcm_pointer() ? Date: Mon, 24 Oct 2011 15:11:46 +0200 Message-ID: References: <1319122970-49404-1-git-send-email-kozerkov@parallels.com> <4EA05B36.8080200@parallels.com> <4EA5509C.9030504@parallels.com> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mx2.suse.de (cantor2.suse.de [195.135.220.15]) by alsa0.perex.cz (Postfix) with ESMTP id 7F1F4103832 for ; Mon, 24 Oct 2011 15:11:49 +0200 (CEST) In-Reply-To: <4EA5509C.9030504@parallels.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: alsa-devel-bounces@alsa-project.org Errors-To: alsa-devel-bounces@alsa-project.org To: Konstantin Ozerkov Cc: "alsa-devel@alsa-project.org" , Denis Lunev List-Id: alsa-devel@alsa-project.org At Mon, 24 Oct 2011 15:48:44 +0400, Konstantin Ozerkov wrote: > > Seems that locking is broken: snd_intel8x0_pcm_pointer() uses spin_lock()/spin_unlock() semantic > for lock which is shared in ISR ( snd_intel8x0_update). As result we got possible deadlock inside ISR > on UP system. And needed special kludge inside snd_intel8x0_pcm_pointer() to prevent moving > backward (really this is race with snd_intel8x0_update). Hm, could you elaborate how can it a problem? snd_intel8x0_update() releases the lock before calling snd_pcm_period_update() that calls the pointer callback. Takashi