From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S268248AbUHKVjl (ORCPT ); Wed, 11 Aug 2004 17:39:41 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S268241AbUHKVhq (ORCPT ); Wed, 11 Aug 2004 17:37:46 -0400 Received: from parcelfarce.linux.theplanet.co.uk ([195.92.249.252]:40390 "EHLO www.linux.org.uk") by vger.kernel.org with ESMTP id S268245AbUHKVg6 (ORCPT ); Wed, 11 Aug 2004 17:36:58 -0400 Date: Wed, 11 Aug 2004 18:14:30 -0300 From: Marcelo Tosatti To: Andrey Savochkin Cc: Jirka Kosina , Giuliano Pochini , linux-kernel@vger.kernel.org Subject: Re: FW: Linux kernel file offset pointer races Message-ID: <20040811211430.GA4275@dmt.cyclades> References: <20040807171500.GA26084@logos.cnet> <20040811182602.A2055@castle.nmd.msu.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040811182602.A2055@castle.nmd.msu.ru> User-Agent: Mutt/1.4i Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Aug 11, 2004 at 06:26:02PM +0400, Andrey Savochkin wrote: > BTW, f_pos assignments are non-atomic on IA-32 since it's a 64-bit value. > The file position is protected by the BKL in llseek(), but I do not see any > serialization neither in sys_read() nor in generic_file_read() and other > methods. > > Have we accepted that the file position may be corrupted after crossing 2^32 > boundary by 2 processes reading in parallel from the same file? > Or am I missing something? Yes, as far as I know, parallel users of the same file descriptions (which can race on 64-bit architectures) is expected, we dont care about handling it. Behaviour is undefined.