Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753823AbZJVCzN (ORCPT ); Wed, 21 Oct 2009 22:55:13 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753148AbZJVCzM (ORCPT ); Wed, 21 Oct 2009 22:55:12 -0400 Received: from bombadil.infradead.org ([18.85.46.34]:52154 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752908AbZJVCzL (ORCPT ); Wed, 21 Oct 2009 22:55:11 -0400 Date: Wed, 21 Oct 2009 22:55:14 -0400 From: Christoph Hellwig To: Frederic Weisbecker Cc: Arnd Bergmann , John Kacur , linux-kernel@vger.kernel.org, Thomas Gleixner , Alan Cox , Ingo Molnar Subject: Re: [PATCH] sony_pi: Remove the BKL from sonypi_misc_open Message-ID: <20091022025514.GB17438@infradead.org> References: <200910200000.24574.arnd@arndb.de> <200910200008.57468.arnd@arndb.de> <20091021213139.GC4880@nowhere> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20091021213139.GC4880@nowhere> User-Agent: Mutt/1.5.19 (2009-01-05) X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org See http://www.infradead.org/rpr.html Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1172 Lines: 25 On Wed, Oct 21, 2009 at 11:31:42PM +0200, Frederic Weisbecker wrote: > What about a pusdown of default_lseek attribution for these > fops that don't have any llseek() (and rename it to > deprecated_default_lseek() ) > > Because we can probably fix these fops one by one but what > about the next drivers that will have no llseek() ? > > We can't attribute default_llseek() by default anymore for > further fops that are to come. The right (although quite complicated) thing is to return -ESPIPE from vfs_llseek if no ->llseek method is present, or even better also disallowing pread/pwrite by default. It'll need a quite substantial audit and is best done by different types of inodes - S_IFIFO is easy, SIFDIR at least has very few instances, S_IFREG usually wants a real llseek (generic_file_llseek in most cases) and directories also need a llseek method that takes i_mutex so it protects against namespace operations. -- 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/