Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754553AbZJKPyK (ORCPT ); Sun, 11 Oct 2009 11:54:10 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754078AbZJKPyJ (ORCPT ); Sun, 11 Oct 2009 11:54:09 -0400 Received: from earthlight.etchedpixels.co.uk ([81.2.110.250]:37271 "EHLO www.etchedpixels.co.uk" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752432AbZJKPyI (ORCPT ); Sun, 11 Oct 2009 11:54:08 -0400 Date: Sun, 11 Oct 2009 16:54:08 +0100 From: Alan Cox To: Arjan van de Ven Cc: John Kacur , linux-kernel@vger.kernel.org, Thomas Gleixner , Frederic Weisbecker , Ingo Molnar , Christoph Hellwig , Jonathan Corbet , Andrew Morton , Vincent Sanders , linux-scsi@vger.kernel.org Subject: Re: [PATCH RFC] [PATCH] drivers/scsi/ch.c: Remove BKL in ch_open Message-ID: <20091011165408.51d4f413@lxorguk.ukuu.org.uk> In-Reply-To: <20091011082917.6ebbd810@infradead.org> References: <20091011153709.4438cf9c@lxorguk.ukuu.org.uk> <20091011082917.6ebbd810@infradead.org> X-Mailer: Claws Mail 3.7.2 (GTK+ 2.14.7; x86_64-redhat-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 780 Lines: 23 > > I'm not so sure. In fact there are some quite umm interesting > > questions about this code, and some of them are shared with other > > modules too. > > > > Consider the following sequence > > > > CPU1 CPU2 > > register_chrdev > > ok > > open device > > takes lock > > > but open does not take the BKL, so the BKL is not protecting you at > all against this.. But module load/unload does - so while the change doesn't appear to cause any problems there is an underlying problem here that wants looking at. -- 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/