From: Arnd Bergmann <arnd@arndb.de>
To: Jaegeuk Kim <jaegeuk@kernel.org>, Chao Yu <yuchao0@huawei.com>
Cc: Arnd Bergmann <arnd@arndb.de>,
Qiuyang Sun <sunqiuyang@huawei.com>,
Sahitya Tummala <stummala@codeaurora.org>,
Eric Biggers <ebiggers@google.com>,
Wang Shilong <wangshilong1991@gmail.com>,
linux-f2fs-devel@lists.sourceforge.net,
linux-kernel@vger.kernel.org
Subject: [PATCH] f2fs: fix 32-bit linking
Date: Fri, 28 Jun 2019 12:39:52 +0200 [thread overview]
Message-ID: <20190628104007.2721479-1-arnd@arndb.de> (raw)
Not all architectures support get_user() with a 64-bit argument:
ERROR: "__get_user_bad" [fs/f2fs/f2fs.ko] undefined!
Use copy_from_user() here, this will always work.
Fixes: d2ae7494d043 ("f2fs: ioctl for removing a range from F2FS")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
fs/f2fs/file.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c
index 998affe31419..465853029b8e 100644
--- a/fs/f2fs/file.c
+++ b/fs/f2fs/file.c
@@ -3066,7 +3066,8 @@ static int f2fs_ioc_resize_fs(struct file *filp, unsigned long arg)
if (f2fs_readonly(sbi->sb))
return -EROFS;
- if (get_user(block_count, (__u64 __user *)arg))
+ if (copy_from_user(&block_count, (void __user *)arg,
+ sizeof(block_count)))
return -EFAULT;
ret = f2fs_resize_fs(sbi, block_count);
--
2.20.0
next reply other threads:[~2019-06-28 10:40 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-28 10:39 Arnd Bergmann [this message]
2019-06-28 12:44 ` Christoph Hellwig
2019-06-28 13:09 ` Arnd Bergmann
2019-06-28 13:17 ` Christoph Hellwig
2019-06-28 14:46 ` Arnd Bergmann
2019-06-28 17:58 ` Russell King - ARM Linux admin
2019-07-01 14:58 ` Arnd Bergmann
2019-06-28 23:25 ` Randy Dunlap
2019-06-28 15:59 ` Jaegeuk Kim
2019-07-01 14:54 ` Arnd Bergmann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190628104007.2721479-1-arnd@arndb.de \
--to=arnd@arndb.de \
--cc=ebiggers@google.com \
--cc=jaegeuk@kernel.org \
--cc=linux-f2fs-devel@lists.sourceforge.net \
--cc=linux-kernel@vger.kernel.org \
--cc=stummala@codeaurora.org \
--cc=sunqiuyang@huawei.com \
--cc=wangshilong1991@gmail.com \
--cc=yuchao0@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®