From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alan Cox Subject: Re: [PATCH] Input: serio_raw - signal EFAULT even if read/write partially succeeds Date: Mon, 30 Apr 2012 22:26:03 +0100 Message-ID: <20120430222603.7a92b5de@pyramind.ukuu.org.uk> References: <20120430064450.GA29212@core.coreip.homeip.net> <20120430111223.4941a9f0@pyramind.ukuu.org.uk> <20120430163442.GA2316@core.coreip.homeip.net> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Return-path: Received: from lxorguk.ukuu.org.uk ([81.2.110.251]:53962 "EHLO lxorguk.ukuu.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756418Ab2D3VXZ (ORCPT ); Mon, 30 Apr 2012 17:23:25 -0400 In-Reply-To: <20120430163442.GA2316@core.coreip.homeip.net> Sender: linux-input-owner@vger.kernel.org List-Id: linux-input@vger.kernel.org To: Dmitry Torokhov Cc: linux-input@vger.kernel.org, Wanlong Gao , Che-Liang Chiou , David Herrmann > If a read() is interrupted by a signal after it has successfully read > some data, it shall return the number of bytes read." Fair point - I guess technically EFAULT is not a signal. I still think its a better behaviour to not lose bytes but objection withdrawn. > No, we'd only go into wait_event_interruptible() if we haven't read > anything yet so we won't lose any data here. Ok Alan