Skip to content

Commit 56446ef

Browse files
committed
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()
2 parents 4fdea58 + ff84778 commit 56446ef

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

drivers/firewire/core-cdev.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1081,8 +1081,6 @@ static int ioctl_queue_iso(struct client *client, union ioctl_arg *arg)
10811081
return -EINVAL;
10821082

10831083
p = (struct fw_cdev_iso_packet __user *)u64_to_uptr(a->packets);
1084-
if (!access_ok(p, a->size))
1085-
return -EFAULT;
10861084

10871085
end = (void __user *)p + a->size;
10881086
count = 0;
@@ -1120,7 +1118,7 @@ static int ioctl_queue_iso(struct client *client, union ioctl_arg *arg)
11201118
&p->header[transmit_header_bytes / 4];
11211119
if (next > end)
11221120
return -EINVAL;
1123-
if (__copy_from_user
1121+
if (copy_from_user
11241122
(u.packet.header, p->header, transmit_header_bytes))
11251123
return -EFAULT;
11261124
if (u.packet.skip && ctx->type == FW_ISO_CONTEXT_TRANSMIT &&

fs/pstore/ram_core.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ static int notrace persistent_ram_update_user(struct persistent_ram_zone *prz,
283283
const void __user *s, unsigned int start, unsigned int count)
284284
{
285285
struct persistent_ram_buffer *buffer = prz->buffer;
286-
int ret = unlikely(__copy_from_user(buffer->data + start, s, count)) ?
286+
int ret = unlikely(copy_from_user(buffer->data + start, s, count)) ?
287287
-EFAULT : 0;
288288
persistent_ram_update_ecc(prz, start, count);
289289
return ret;
@@ -348,8 +348,6 @@ int notrace persistent_ram_write_user(struct persistent_ram_zone *prz,
348348
int rem, ret = 0, c = count;
349349
size_t start;
350350

351-
if (unlikely(!access_ok(s, count)))
352-
return -EFAULT;
353351
if (unlikely(c > prz->buffer_size)) {
354352
s += c - prz->buffer_size;
355353
c = prz->buffer_size;

0 commit comments

Comments
 (0)