um: wrong sigmask saved in case of multiple sigframes
we can't just find oldmask once; if there are multiple signals and we loop building sigframes for those, ->saved_mask will be definitely wrong for all but the first one. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
@@ -74,15 +74,14 @@ static int kern_do_signal(struct pt_regs *regs)
|
|||||||
{
|
{
|
||||||
struct k_sigaction ka_copy;
|
struct k_sigaction ka_copy;
|
||||||
siginfo_t info;
|
siginfo_t info;
|
||||||
sigset_t *oldset;
|
|
||||||
int sig, handled_sig = 0;
|
int sig, handled_sig = 0;
|
||||||
|
|
||||||
|
while ((sig = get_signal_to_deliver(&info, &ka_copy, regs, NULL)) > 0) {
|
||||||
|
sigset_t *oldset;
|
||||||
if (test_thread_flag(TIF_RESTORE_SIGMASK))
|
if (test_thread_flag(TIF_RESTORE_SIGMASK))
|
||||||
oldset = ¤t->saved_sigmask;
|
oldset = ¤t->saved_sigmask;
|
||||||
else
|
else
|
||||||
oldset = ¤t->blocked;
|
oldset = ¤t->blocked;
|
||||||
|
|
||||||
while ((sig = get_signal_to_deliver(&info, &ka_copy, regs, NULL)) > 0) {
|
|
||||||
handled_sig = 1;
|
handled_sig = 1;
|
||||||
/* Whee! Actually deliver the signal. */
|
/* Whee! Actually deliver the signal. */
|
||||||
if (!handle_signal(regs, sig, &ka_copy, &info, oldset)) {
|
if (!handle_signal(regs, sig, &ka_copy, &info, oldset)) {
|
||||||
|
Reference in New Issue
Block a user