From: Bart Van Assche <bart.vanassche@wdc.com>
To: Al Viro <viro@zeniv.linux.org.uk>
Cc: linux-block@vger.kernel.org, linux-kernel@vger.kernel.org,
Bart Van Assche <bart.vanassche@wdc.com>,
stable@vger.kernel.org
Subject: [PATCH 1/2] <linux/uaccess.h>: Fix copy_in_user() declaration
Date: Wed, 23 Aug 2017 15:29:10 -0700 [thread overview]
Message-ID: <20170823222911.29453-2-bart.vanassche@wdc.com> (raw)
In-Reply-To: <20170823222911.29453-1-bart.vanassche@wdc.com>
copy_in_user() copies data from user-space address @from to user-
space address @to. Hence declare both @from and @to as user-space
pointers.
Fixes: commit d597580d3737 ("generic ...copy_..._user primitives")
Signed-off-by: Bart Van Assche <bart.vanassche@wdc.com>
Cc: <stable@vger.kernel.org>
---
include/linux/uaccess.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/linux/uaccess.h b/include/linux/uaccess.h
index acdd6f915a8d..20ef8e6ec2db 100644
--- a/include/linux/uaccess.h
+++ b/include/linux/uaccess.h
@@ -156,7 +156,7 @@ copy_to_user(void __user *to, const void *from, unsigned long n)
}
#ifdef CONFIG_COMPAT
static __always_inline unsigned long __must_check
-copy_in_user(void __user *to, const void *from, unsigned long n)
+copy_in_user(void __user *to, const void __user *from, unsigned long n)
{
might_fault();
if (access_ok(VERIFY_WRITE, to, n) && access_ok(VERIFY_READ, from, n))
--
2.14.0
next prev parent reply other threads:[~2017-08-23 22:30 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-23 22:29 [PATCH 0/2] Two copy_in_user() declaration fixes Bart Van Assche
2017-08-23 22:29 ` Bart Van Assche [this message]
2017-08-31 21:21 ` [PATCH 1/2] <linux/uaccess.h>: Fix copy_in_user() declaration Bart Van Assche
2017-08-31 21:24 ` Al Viro
2017-08-23 22:29 ` [PATCH 2/2] compat_hdio_ioctl: Fix a declaration Bart Van Assche
2017-08-24 14:40 ` Jens Axboe
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=20170823222911.29453-2-bart.vanassche@wdc.com \
--to=bart.vanassche@wdc.com \
--cc=linux-block@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=stable@vger.kernel.org \
--cc=viro@zeniv.linux.org.uk \
/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