Message ID | 20211221025012.1057923-8-richard.henderson@linaro.org |
---|---|
State | New |
Headers | show |
Series | linux-user: nios2 fixes | expand |
Le 21/12/2021 à 03:50, Richard Henderson a écrit : > Using do_sigprocmask directly was incorrect, as it will > leave the signal blocked by the outer layers of linux-user. > > Reviewed-by: Laurent Vivier <laurent@vivier.eu> > Signed-off-by: Richard Henderson <richard.henderson@linaro.org> > --- > linux-user/nios2/signal.c | 2 +- > linux-user/signal.c | 2 -- > 2 files changed, 1 insertion(+), 3 deletions(-) > > diff --git a/linux-user/nios2/signal.c b/linux-user/nios2/signal.c > index 80e3d42fc9..517cd39270 100644 > --- a/linux-user/nios2/signal.c > +++ b/linux-user/nios2/signal.c > @@ -205,7 +205,7 @@ long do_rt_sigreturn(CPUNios2State *env) > } > > target_to_host_sigset(&set, &frame->uc.tuc_sigmask); > - do_sigprocmask(SIG_SETMASK, &set, NULL); > + set_sigmask(&set); > > if (rt_restore_ucontext(env, &frame->uc, &rval)) { > goto badframe; > diff --git a/linux-user/signal.c b/linux-user/signal.c > index 6d5e5b698c..8cb33a351c 100644 > --- a/linux-user/signal.c > +++ b/linux-user/signal.c > @@ -258,7 +258,6 @@ int do_sigprocmask(int how, const sigset_t *set, sigset_t *oldset) > return 0; > } > > -#if !defined(TARGET_NIOS2) > /* Just set the guest's signal mask to the specified value; the > * caller is assumed to have called block_signals() already. > */ > @@ -268,7 +267,6 @@ void set_sigmask(const sigset_t *set) > > ts->signal_mask = *set; > } > -#endif > > /* sigaltstack management */ > Applied to my linux-user-for-7.0 branch. Thanks, Laurent
diff --git a/linux-user/nios2/signal.c b/linux-user/nios2/signal.c index 80e3d42fc9..517cd39270 100644 --- a/linux-user/nios2/signal.c +++ b/linux-user/nios2/signal.c @@ -205,7 +205,7 @@ long do_rt_sigreturn(CPUNios2State *env) } target_to_host_sigset(&set, &frame->uc.tuc_sigmask); - do_sigprocmask(SIG_SETMASK, &set, NULL); + set_sigmask(&set); if (rt_restore_ucontext(env, &frame->uc, &rval)) { goto badframe; diff --git a/linux-user/signal.c b/linux-user/signal.c index 6d5e5b698c..8cb33a351c 100644 --- a/linux-user/signal.c +++ b/linux-user/signal.c @@ -258,7 +258,6 @@ int do_sigprocmask(int how, const sigset_t *set, sigset_t *oldset) return 0; } -#if !defined(TARGET_NIOS2) /* Just set the guest's signal mask to the specified value; the * caller is assumed to have called block_signals() already. */ @@ -268,7 +267,6 @@ void set_sigmask(const sigset_t *set) ts->signal_mask = *set; } -#endif /* sigaltstack management */