[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230515061923.767680-1-suhui@nfschina.com>
Date: Mon, 15 May 2023 14:19:23 +0800
From: Su Hui <suhui@...china.com>
To: Jan Harkes <jaharkes@...cmu.edu>, coda@...cmu.edu
Cc: codalist@...a.cs.cmu.edu, linux-kernel@...r.kernel.org,
kernel-janitors@...r.kernel.org, Su Hui <suhui@...china.com>
Subject: [PATCH] coda: return -EFAULT if copy fails
The copy_to/from_user() functions should return -EFAULT instead of -EINVAL.
Signed-off-by: Su Hui <suhui@...china.com>
---
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
Powered by blists - more mailing lists