[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20211122101256.7875-1-amit.kachhap@arm.com>
Date: Mon, 22 Nov 2021 15:42:56 +0530
From: Amit Daniel Kachhap <amit.kachhap@....com>
To: linux-fsdevel@...r.kernel.org
Cc: linux-kernel@...r.kernel.org,
Andrew Morton <akpm@...ux-foundation.org>,
Vincenzo Frascino <Vincenzo.Frascino@....com>,
Kevin Brodsky <kevin.brodsky@....com>,
Amit Daniel Kachhap <amit.kachhap@....com>,
Al Viro <viro@...iv.linux.org.uk>
Subject: [PATCH v2] fs/ioctl: Remove unnecessary __user annotation
__user annotations are used by the checker (e.g sparse) to mark user
pointers. However here __user is applied to a struct directly, without
a pointer being directly involved.
Although the presence of __user does not cause sparse to emit a warning,
__user should be removed for consistency with other uses of offsetof().
Note: No functional changes intended.
Cc: Al Viro <viro@...iv.linux.org.uk>
Signed-off-by: Amit Daniel Kachhap <amit.kachhap@....com>
---
Re-posting v2 with minor commit log changes for v5.16-rc1.
fs/ioctl.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/ioctl.c b/fs/ioctl.c
index 504e69578112..1ed097e94af2 100644
--- a/fs/ioctl.c
+++ b/fs/ioctl.c
@@ -430,7 +430,7 @@ static int ioctl_file_dedupe_range(struct file *file,
goto out;
}
- size = offsetof(struct file_dedupe_range __user, info[count]);
+ size = offsetof(struct file_dedupe_range, info[count]);
if (size > PAGE_SIZE) {
ret = -ENOMEM;
goto out;
--
2.17.1
Powered by blists - more mailing lists