From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756592AbYEQNqQ (ORCPT ); Sat, 17 May 2008 09:46:16 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754046AbYEQNqA (ORCPT ); Sat, 17 May 2008 09:46:00 -0400 Received: from mail.suse.de ([195.135.220.2]:35889 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751937AbYEQNp7 (ORCPT ); Sat, 17 May 2008 09:45:59 -0400 Date: Sat, 17 May 2008 15:45:57 +0200 Message-ID: From: Takashi Iwai To: Thomas Gleixner Cc: Andrew Morton , bugme-daemon@bugzilla.kernel.org, linux-kernel@vger.kernel.org, Ingo Molnar , Stas Sergeev Subject: Re: [Bugme-new] [Bug 10701] New: snd_pcsp lockdep warning In-Reply-To: References: <20080515110244.6e15d4c3.akpm@linux-foundation.org> <20080516103827.0d5ab023.akpm@linux-foundation.org> User-Agent: Wanderlust/2.14.0 (Africa) SEMI/1.14.6 (Maruoka) FLIM/1.14.7 (=?ISO-8859-4?Q?Sanj=F2?=) APEL/10.6 MULE XEmacs/21.5 (beta28) (fuki) (+CVS-20070806) (i386-suse-linux) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org At Fri, 16 May 2008 21:32:49 +0200 (CEST), Thomas Gleixner wrote: > > On Fri, 16 May 2008, Andrew Morton wrote: > > > So the author was well aware of locking problem and the whole code is > > > just a stupid hack around the problem without solving it. This code is > > > not at all suited for HRTIMER_CB_IRQSAFE. > > > > You sound impressed! So what's the fix? HRTIMER_CB_SOFTIRQ? > > Yeah, impressed by creativity. HRTIMER_CB_SOFTIRQ should be the right > thing. Well, it'd be basically a similar way like snd-pcsp currently does ("a stupid hack" :) But, it's good to have a fix, anyway, since this sounds like a generic problem with a callback in a spinlock. If the callback requires another own lock, this can easily lead to a AB/BA deadlock. Actually, ALSA PCM core had sometimes similar problems, too. thanks, Takashi