Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp1608855rwd; Sun, 14 May 2023 23:51:46 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7Yhvbmgy0biz6ZYwQ1+wUm/93KGQj0OzUfQFH/klOtD+IxuLMImi5Suaq8771Gz6pPRcZN X-Received: by 2002:a17:902:c3cc:b0:1ab:63e:67b0 with SMTP id j12-20020a170902c3cc00b001ab063e67b0mr32940190plj.54.1684133505956; Sun, 14 May 2023 23:51:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684133505; cv=none; d=google.com; s=arc-20160816; b=E7/nGZMosOD/b4nOX5ndM4B/caPiFroUuRn4L8ekWs+8TErZ8m6fT6DQqtVMHE/niO lfR6woRL8qoUo2GhJK+WfugANuMdA9/qeXThlZFekYhHXTt+YjbLaXqrI6i7mNxYbB45 hE980tWxOfv8m2h6mYgHZisHVTnuS8Ojq7EyeikCDMISXqo3kaGFhJupnDib86Tf9l6X HMGdDeG5LUZZKaILrEMENxWVLaKd+ZHF+jfTrwjpJpwTWLhEv3R2i4c2W/ZN5tsE8Jbv FBnPZDhRm9IkKNOcjIOp03DMWo3EgsQ4bXhyd15F7fma1B8kjojNPXMujBXRMtycPtXm lfig== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=aIXZetLJ4wDIJh1HKyonIBy27ceb78zlT/q3IrwhK/0=; b=JaOmoOhmkuWUxcr27xUpDW4nsEN8YH4vUum4SnGC26lpo6/cyHoWWhtJRxaG+hyVgt kA9BoUQtV5YURSZvdCg1tP0fePErGNeI7Y0KwbPyVB4Amp/5BsQObTJ4kpbs8X2p+UEu QLIvGYixykKeuFR9U3/i4Fz+FCIjc8fs75k/4M1LugQx5Te97Uq99yXivVcKDtUu1f+W sxeE/QQj6jJa2w/SgyCkJ8F0JeK9jvDkjI0ILqCqFVPV1EyenVElTQ+wleoLGQQKWgNO vnLn3AcxH+t+Y2wcKHFHneHnCZwZshEDfRv5+hPtmICeNUVuoh16QANceaJsnZSz26Da Jx0g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id na14-20020a17090b4c0e00b00250aa670558si17266332pjb.43.2023.05.14.23.51.34; Sun, 14 May 2023 23:51:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231948AbjEOGTo (ORCPT + 99 others); Mon, 15 May 2023 02:19:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51884 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229701AbjEOGTm (ORCPT ); Mon, 15 May 2023 02:19:42 -0400 Received: from mail.nfschina.com (unknown [42.101.60.195]) by lindbergh.monkeyblade.net (Postfix) with SMTP id 9E24E1722; Sun, 14 May 2023 23:19:37 -0700 (PDT) Received: from localhost.localdomain (unknown [180.167.10.98]) by mail.nfschina.com (Maildata Gateway V2.8.8) with ESMTPA id 1007018011BD54; Mon, 15 May 2023 14:19:28 +0800 (CST) X-MD-Sfrom: suhui@nfschina.com X-MD-SrcIP: 180.167.10.98 From: Su Hui To: Jan Harkes , coda@cs.cmu.edu Cc: codalist@coda.cs.cmu.edu, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, Su Hui Subject: [PATCH] coda: return -EFAULT if copy fails Date: Mon, 15 May 2023 14:19:23 +0800 Message-Id: <20230515061923.767680-1-suhui@nfschina.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.1 required=5.0 tests=BAYES_00,RDNS_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The copy_to/from_user() functions should return -EFAULT instead of -EINVAL. Signed-off-by: Su Hui --- fs/coda/upcall.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/coda/upcall.c b/fs/coda/upcall.c index cd6a3721f6f6..1517dc3bd592 100644 --- a/fs/coda/upcall.c +++ b/fs/coda/upcall.c @@ -510,7 +510,7 @@ int venus_pioctl(struct super_block *sb, struct CodaFid *fid, /* get the data out of user space */ if (copy_from_user((char *)inp + (long)inp->coda_ioctl.data, data->vi.in, data->vi.in_size)) { - error = -EINVAL; + error = -EFAULT; goto exit; } -- 2.30.2