Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754101AbZJKPU4 (ORCPT ); Sun, 11 Oct 2009 11:20:56 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752394AbZJKPUy (ORCPT ); Sun, 11 Oct 2009 11:20:54 -0400 Received: from vena.lwn.net ([206.168.112.25]:43640 "EHLO vena.lwn.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751322AbZJKPUy (ORCPT ); Sun, 11 Oct 2009 11:20:54 -0400 Date: Sun, 11 Oct 2009 09:20:15 -0600 From: Jonathan Corbet To: John Kacur Cc: Alan Cox , linux-kernel@vger.kernel.org, Thomas Gleixner , Peter Zijlstra , Frederic Weisbecker , Christoph Hellwig , Andrew Morton , Vincent^M^J Sanders , Ingo Molnar Subject: Re: [PATCH] sound_core.c: Remove BKL from soundcore_open Message-ID: <20091011092015.37a69847@bike.lwn.net> In-Reply-To: References: <20091011004219.74c30f67@lxorguk.ukuu.org.uk> Organization: LWN.net X-Mailer: Claws Mail 3.7.2 (GTK+ 2.16.6; x86_64-redhat-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 916 Lines: 21 On Sun, 11 Oct 2009 02:25:53 +0200 (CEST) John Kacur wrote: > Yikes, I missed that. Still I'm loath to just push it down like that. I > wonder if I can use a mutex there. What about the following patch? Unfortunately, it's often not quite that simple. What if, say, there's an ioctl() function somewhere which is depending on the BKL for exclusion here? This change would then introduce races. Changing the BKL to a mutex is a real semantic change which requires a real survey of the code affected. That's why the pushdown approach has been taken so often. It's a pain, but it eventually shines a spotlight on every bit of affected code. jon -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/