diff options
| author | Dmitry Chagin <dchagin@FreeBSD.org> | 2022-05-30 16:48:20 +0000 |
|---|---|---|
| committer | Dmitry Chagin <dchagin@FreeBSD.org> | 2022-05-30 16:48:20 +0000 |
| commit | 2ab9b59faafb68402dbebc285b424cfb06b59cf3 (patch) | |
| tree | d7989a8c762a9ec7e7f73ef966bd1c06dfa95518 | |
| parent | 2ca34847e7288fba6b2a15e64648238bc12e4960 (diff) | |
linux(4): Avoid direct manipulation of td_sigmask
Use kern_sigprocmask() instead of direct manipulation of td_sigmask
to reschedule newly blocked signals.
MFC after: 2 weeks
| -rw-r--r-- | sys/amd64/linux/linux_sysvec.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/sys/amd64/linux/linux_sysvec.c b/sys/amd64/linux/linux_sysvec.c index acfc4d6831f3..7aa2cfc1b30e 100644 --- a/sys/amd64/linux/linux_sysvec.c +++ b/sys/amd64/linux/linux_sysvec.c @@ -466,6 +466,7 @@ linux_rt_sigreturn(struct thread *td, struct linux_rt_sigreturn_args *args) struct l_sigcontext *context; struct trapframe *regs; unsigned long rflags; + sigset_t bmask; int error; ksiginfo_t ksi; @@ -514,11 +515,8 @@ linux_rt_sigreturn(struct thread *td, struct linux_rt_sigreturn_args *args) return (EINVAL); } - PROC_LOCK(p); - linux_to_bsd_sigset(&uc.uc_sigmask, &td->td_sigmask); - SIG_CANTMASK(td->td_sigmask); - signotify(td); - PROC_UNLOCK(p); + linux_to_bsd_sigset(&uc.uc_sigmask, &bmask); + kern_sigprocmask(td, SIG_SETMASK, &bmask, NULL, 0); regs->tf_rdi = context->sc_rdi; regs->tf_rsi = context->sc_rsi; |
