signal: cleanup sys_rt_sigprocmask()
sys_rt_sigprocmask() looks unnecessarily complicated, simplify it. We can just read current->blocked lockless unconditionally before anything else and then copy-to-user it if needed. At worst we copy 4 words on mips. We could copy-to-user the old mask first and simplify the code even more, but the patch tries to keep the current behaviour: we change current->block even if copy_to_user(oset) fails. Signed-off-by: NOleg Nesterov <oleg@redhat.com> Reviewed-by: NMatt Fleming <matt.fleming@linux.intel.com> Acked-by: NTejun Heo <tj@kernel.org>
Showing
想要评论请 注册 或 登录