From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S266778AbUHIRZS (ORCPT ); Mon, 9 Aug 2004 13:25:18 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S266781AbUHIRZS (ORCPT ); Mon, 9 Aug 2004 13:25:18 -0400 Received: from fw.osdl.org ([65.172.181.6]:21188 "EHLO mail.osdl.org") by vger.kernel.org with ESMTP id S266778AbUHIRZF (ORCPT ); Mon, 9 Aug 2004 13:25:05 -0400 Date: Mon, 9 Aug 2004 10:24:50 -0700 (PDT) From: Linus Torvalds To: Jonathan Corbet cc: Alan Cox , linux-kernel@vger.kernel.org Subject: Re: FW: Linux kernel file offset pointer races In-Reply-To: <20040809165012.25562.qmail@lwn.net> Message-ID: References: <20040809165012.25562.qmail@lwn.net> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 9 Aug 2004, Jonathan Corbet wrote: > > This (along with the bits which have just gone into BK) hints at a > driver API change. Inquiring minds are *very* curious about such things > at the moment... will there be a file_operations method prototype > change associated with the file offset fixes? No, it's all just building up to the kernel internally always using a pread/pwrite-like thing to the drivers, and then maintaining f_pos entirely in the VFS layer. All the VFS interfaces do this already (since that is how the user-visible pread/pwrite works). But a few drivers are buggy (they access f_pos directly even if it was a user-level pread/pwrite), and in particular the /proc sysctl interface was totally broken this way. So I've fixed the sysctl code - that _did_ require a prototype change, but wasn't horribly painful, and am going through drivers.. Linus