From mboxrd@z Thu Jan 1 00:00:00 1970 From: Al Viro Date: Tue, 25 Jun 2019 23:18:54 +0000 Subject: Re: [PATCH v2] drm: return -EFAULT if copy_to_user() fails Message-Id: <20190625231854.GL17978@ZenIV.linux.org.uk> List-Id: References: <20190618125623.GA24896@mwanda> <20190618131843.GA29463@mwanda> <20190618171629.GB25413@art_vandelay> In-Reply-To: <20190618171629.GB25413@art_vandelay> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Sean Paul Cc: Dan Carpenter , Maarten Lankhorst , Maxime Ripard , David Airlie , Daniel Vetter , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org On Tue, Jun 18, 2019 at 01:16:29PM -0400, Sean Paul wrote: > On Tue, Jun 18, 2019 at 04:18:43PM +0300, Dan Carpenter wrote: > > The copy_from_user() function returns the number of bytes remaining > > to be copied but we want to return a negative error code. Otherwise > > the callers treat it as a successful copy. > > > > Signed-off-by: Dan Carpenter > > Thanks Dan, I've applied this to drm-misc-fixes. FWIW, Acked-by: Al Viro From mboxrd@z Thu Jan 1 00:00:00 1970 From: Al Viro Subject: Re: [PATCH v2] drm: return -EFAULT if copy_to_user() fails Date: Wed, 26 Jun 2019 00:18:54 +0100 Message-ID: <20190625231854.GL17978@ZenIV.linux.org.uk> References: <20190618125623.GA24896@mwanda> <20190618131843.GA29463@mwanda> <20190618171629.GB25413@art_vandelay> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: <20190618171629.GB25413@art_vandelay> Sender: linux-kernel-owner@vger.kernel.org To: Sean Paul Cc: Dan Carpenter , Maarten Lankhorst , Maxime Ripard , David Airlie , Daniel Vetter , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org List-Id: dri-devel@lists.freedesktop.org On Tue, Jun 18, 2019 at 01:16:29PM -0400, Sean Paul wrote: > On Tue, Jun 18, 2019 at 04:18:43PM +0300, Dan Carpenter wrote: > > The copy_from_user() function returns the number of bytes remaining > > to be copied but we want to return a negative error code. Otherwise > > the callers treat it as a successful copy. > > > > Signed-off-by: Dan Carpenter > > Thanks Dan, I've applied this to drm-misc-fixes. FWIW, Acked-by: Al Viro