ARM: compat: remove KERNEL_DS usage in sys_oabi_epoll_ctl()
We no longer need to switch to KERNEL_DS mode in sys_oabi_epoll_ctl() as we can use do_epoll_ctl() to avoid the additional copy. Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
This commit is contained in:
parent
8f3d9f3542
commit
c281634c86
@ -253,20 +253,15 @@ asmlinkage long sys_oabi_epoll_ctl(int epfd, int op, int fd,
|
|||||||
{
|
{
|
||||||
struct oabi_epoll_event user;
|
struct oabi_epoll_event user;
|
||||||
struct epoll_event kernel;
|
struct epoll_event kernel;
|
||||||
mm_segment_t fs;
|
|
||||||
long ret;
|
|
||||||
|
|
||||||
if (op == EPOLL_CTL_DEL)
|
if (ep_op_has_event(op) &&
|
||||||
return sys_epoll_ctl(epfd, op, fd, NULL);
|
copy_from_user(&user, event, sizeof(user)))
|
||||||
if (copy_from_user(&user, event, sizeof(user)))
|
|
||||||
return -EFAULT;
|
return -EFAULT;
|
||||||
|
|
||||||
kernel.events = user.events;
|
kernel.events = user.events;
|
||||||
kernel.data = user.data;
|
kernel.data = user.data;
|
||||||
fs = get_fs();
|
|
||||||
set_fs(KERNEL_DS);
|
return do_epoll_ctl(epfd, op, fd, &kernel, false);
|
||||||
ret = sys_epoll_ctl(epfd, op, fd, &kernel);
|
|
||||||
set_fs(fs);
|
|
||||||
return ret;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
asmlinkage long sys_oabi_epoll_wait(int epfd,
|
asmlinkage long sys_oabi_epoll_wait(int epfd,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user