arm: compat: remove KERNEL_DS usage in sys_oabi_epoll_ctl()
PATCH 1/1 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.
Signed-off-by Russell King <[email protected]>
--- arch/arm/kernel/sys_oabi-compat.c | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-)
arch/arm/kernel/sys_oabi-compat.c +5 -10
@@ -253,20 +253,15 @@ asmlinkage long sys_oabi_epoll_ctl(int epfd, int op, int fd, {struct oabi_epoll_event user;struct epoll_event kernel; -mm_segment_t fs; -long ret; -if (op ==EPOLL_CTL_DEL ) -return sys_epoll_ctl (epfd, op, fd,NULL ); -if (copy_from_user (&user, event,sizeof (user))) +if (ep_op_has_event (op) && +copy_from_user (&user, event,sizeof (user)))return -EFAULT ; + kernel.events = user.events; kernel.data = user.data; - fs =get_fs (); -set_fs (KERNEL_DS ); - ret =sys_epoll_ctl (epfd, op, fd, &kernel); -set_fs (fs); -return ret; + +return do_epoll_ctl (epfd, op, fd, &kernel, false); } asmlinkage long sys_oabi_epoll_wait(int epfd,
Signature · 7 lines
2.20.1 _______________________________________________ linux-arm-kernel mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Quoted 4 lines · Russell King
We no longer need to switch to
KERNEL_DSmode insys_oabi_epoll_ctl()as we can usedo_epoll_ctl()to avoid the additional copy.Signed-off-by Russell King <[email protected]>
Looks good:
Reviewed-by Christoph Hellwig <[email protected]>
_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel