summaryrefslogtreecommitdiffstats
path: root/fs/pstore
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2020-06-01 16:18:46 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2020-06-01 16:18:46 -0700
commit56446efab9ce4961fe0fe6bbc5bc66374b08b9f3 (patch)
tree229e71b9be9f854f3d9c6104ca21af76d7eae1fc /fs/pstore
parent4fdea5848b3c7fb13a0bfd7f768dcf15b534dafe (diff)
parentff847781049c37dff9ad4af2bf2d7aad02622f96 (diff)
downloadlinux-56446efab9ce4961fe0fe6bbc5bc66374b08b9f3.tar.gz
linux-56446efab9ce4961fe0fe6bbc5bc66374b08b9f3.tar.bz2
linux-56446efab9ce4961fe0fe6bbc5bc66374b08b9f3.zip
Merge branch 'uaccess.__copy_from_user' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
Pull uaccess/__copy_from_user updates from Al Viro: "Getting rid of __copy_from_user() callers - patches that don't fit into other series" * 'uaccess.__copy_from_user' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: pstore: switch to copy_from_user() firewire: switch ioctl_queue_iso to use of copy_from_user()
Diffstat (limited to 'fs/pstore')
-rw-r--r--fs/pstore/ram_core.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/fs/pstore/ram_core.c b/fs/pstore/ram_core.c
index c917c191e78c..aa8e0b65ff1a 100644
--- a/fs/pstore/ram_core.c
+++ b/fs/pstore/ram_core.c
@@ -283,7 +283,7 @@ static int notrace persistent_ram_update_user(struct persistent_ram_zone *prz,
const void __user *s, unsigned int start, unsigned int count)
{
struct persistent_ram_buffer *buffer = prz->buffer;
- int ret = unlikely(__copy_from_user(buffer->data + start, s, count)) ?
+ int ret = unlikely(copy_from_user(buffer->data + start, s, count)) ?
-EFAULT : 0;
persistent_ram_update_ecc(prz, start, count);
return ret;
@@ -348,8 +348,6 @@ int notrace persistent_ram_write_user(struct persistent_ram_zone *prz,
int rem, ret = 0, c = count;
size_t start;
- if (unlikely(!access_ok(s, count)))
- return -EFAULT;
if (unlikely(c > prz->buffer_size)) {
s += c - prz->buffer_size;
c = prz->buffer_size;