Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 26391
b: refs/heads/master
c: d261020
h: refs/heads/master
i:
  26389: 4c97f2d
  26387: 77d39ba
  26383: 9decdb5
v: v3
  • Loading branch information
Andi Kleen authored and Linus Torvalds committed May 2, 2006
1 parent 4606dcc commit 99f519f
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 5e7dd2ab6b9bdfa60e19b8739e6b2a204fd4f477
refs/heads/master: d2610202290b4924b71747314a0f88f28807702e
1 change: 1 addition & 0 deletions trunk/arch/x86_64/ia32/ia32entry.S
Original file line number Diff line number Diff line change
Expand Up @@ -695,4 +695,5 @@ ia32_sys_call_table:
.quad sys_splice
.quad sys_sync_file_range
.quad sys_tee
.quad compat_sys_vmsplice
ia32_syscall_end:
20 changes: 20 additions & 0 deletions trunk/fs/compat.c
Original file line number Diff line number Diff line change
Expand Up @@ -1317,6 +1317,26 @@ compat_sys_writev(unsigned long fd, const struct compat_iovec __user *vec, unsig
return ret;
}

asmlinkage long
compat_sys_vmsplice(int fd, const struct compat_iovec __user *iov32,
unsigned int nr_segs, unsigned int flags)
{
unsigned i;
struct iovec *iov;
if (nr_segs >= UIO_MAXIOV)
return -EINVAL;
iov = compat_alloc_user_space(nr_segs * sizeof(struct iovec));
for (i = 0; i < nr_segs; i++) {
struct compat_iovec v;
if (get_user(v.iov_base, &iov32[i].iov_base) ||
get_user(v.iov_len, &iov32[i].iov_len) ||
put_user(compat_ptr(v.iov_base), &iov[i].iov_base) ||
put_user(v.iov_len, &iov[i].iov_len))
return -EFAULT;
}
return sys_vmsplice(fd, iov, nr_segs, flags);
}

/*
* Exactly like fs/open.c:sys_open(), except that it doesn't set the
* O_LARGEFILE flag.
Expand Down

0 comments on commit 99f519f

Please sign in to comment.