[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20091022025514.GB17438@infradead.org>
Date: Wed, 21 Oct 2009 22:55:14 -0400
From: Christoph Hellwig <hch@...radead.org>
To: Frederic Weisbecker <fweisbec@...il.com>
Cc: Arnd Bergmann <arndbergmann@...glemail.com>,
John Kacur <jkacur@...hat.com>, linux-kernel@...r.kernel.org,
Thomas Gleixner <tglx@...utronix.de>,
Alan Cox <alan@...rguk.ukuu.org.uk>,
Ingo Molnar <mingo@...e.hu>
Subject: Re: [PATCH] sony_pi: Remove the BKL from sonypi_misc_open
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@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists