Received: by 2002:a25:f815:0:0:0:0:0 with SMTP id u21csp52234ybd; Tue, 25 Jun 2019 16:19:21 -0700 (PDT) X-Google-Smtp-Source: APXvYqz8g/vPQVgdgB0PzOCtQPN99XxLMleU6c37akrm936az6EUdg8r0vEhQ4PrDHujNwY/k+bY X-Received: by 2002:a63:df05:: with SMTP id u5mr8061958pgg.171.1561504760961; Tue, 25 Jun 2019 16:19:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561504760; cv=none; d=google.com; s=arc-20160816; b=x3Z91G0Ipkld1ZajouVw5spH6AcAVr08Yncg/PFegARIGheX0RYN8ecpf76SDELOrP sHw2XI9K4PPnhtk6HRQ6fBb2weu5c1Z71g2GIr2Y/03dNkmy4fB0c5Yeb/gotsrjHLRP RC3imlcijZv7WKwBtpJUa7xoWxvQtvZUjOMZp+3NZ2snlsZySFlvXvRPAcIdG8k6QPfn 7lbLEbI/RaNIqfxnL1bxOVO3zn5jo8fpV18kwrpoxn5ZQNUXqSEKguR8AYejfP0PPFof 6013SYlVAFj4G7urrVHjmaMbz0FqG7FvntehEGj3OYnUmOmT1M+S57cbjr+NcQxIq9Cf tTzg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=Ss3JbnF9erXbYk8py51nVBv1U9SRwOOmor08SQEYSJQ=; b=nEYFuCs9w/FiZBsdfqKuWSzKe4dOa/UBGTc53cYUby9JEmnoKTik67QosaAC1mFkMc TzJOyFIXr3xAkUpHUj1ybcgju+kat3+ZDNTlcXTVfvFYH5Iv0u1+7isfiTcToaBxCVpL QRxz0RkzZUEZcOL9v6OwA11BmlBhxMoHEnNBP+2wlCp9uMw4t/WN8g9XhkMHKCX9Mn// Vp6RDQPRXEwqF+qAcUgoTkTjO/fk0VGpNzC0pM4IAS+FOQYcCfy+/tEFEXQ+O5Dr1h4W xyQ/Jsi6/vtwZw+clRrPt4srLcPTJCrUDP57oEONFF40FfJK0iYC3UNAQlVpObVyEmW0 l7YQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k16si15329260pfk.68.2019.06.25.16.19.04; Tue, 25 Jun 2019 16:19:20 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726307AbfFYXTB (ORCPT + 99 others); Tue, 25 Jun 2019 19:19:01 -0400 Received: from zeniv.linux.org.uk ([195.92.253.2]:40914 "EHLO ZenIV.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725782AbfFYXTB (ORCPT ); Tue, 25 Jun 2019 19:19:01 -0400 Received: from viro by ZenIV.linux.org.uk with local (Exim 4.92 #3 (Red Hat Linux)) id 1hfuiE-0002co-Rt; Tue, 25 Jun 2019 23:18:54 +0000 Date: Wed, 26 Jun 2019 00:18:54 +0100 From: Al Viro 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 Subject: Re: [PATCH v2] drm: return -EFAULT if copy_to_user() fails 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 Content-Disposition: inline In-Reply-To: <20190618171629.GB25413@art_vandelay> User-Agent: Mutt/1.11.3 (2019-02-01) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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