2002-09-14 10:19:12

by Ingo Molnar

[permalink] [raw]
Subject: [patch] Re: New failures in nightly LTP test


On 13 Sep 2002, Paul Larson wrote:

> The nightly LTP test against the 2.5 kernel bk tree last night turned up
> some test failures we don't normally see. These failures did not show
> up in the run from the previous night.

[...]
> I found what was breaking this, looks like it was this change from your
> shared thread signals patch:
> - if (sig < 1 || sig > _NSIG ||
> - (act && (sig == SIGKILL || sig == SIGSTOP)))
> + if (sig < 1 || sig > _NSIG || (act && sig_kernel_only(sig)))

the attached patch (against BK-curr) fixes this bug and a number of others
in the same class - the signal behavior bitmasks should never be consulted
before making sure that the signal is in the word range. Paul, does this
fix all the LTP regressions?

Ingo

--- linux/kernel/signal.c.orig Sat Sep 14 11:25:30 2002
+++ linux/kernel/signal.c Sat Sep 14 11:42:29 2002
@@ -118,14 +118,18 @@
#define T(sig, mask) \
((1UL << (sig)) & mask)

-#define sig_user_specific(sig) T(sig, SIG_USER_SPECIFIC_MASK)
+#define sig_user_specific(sig) \
+ (((sig) < SIGRTMIN) && T(sig, SIG_USER_SPECIFIC_MASK))
#define sig_user_load_balance(sig) \
- (T(sig, SIG_USER_LOAD_BALANCE_MASK) || ((sig) >= SIGRTMIN))
-#define sig_kernel_specific(sig) T(sig, SIG_KERNEL_SPECIFIC_MASK)
+ (((sig) >= SIGRTMIN) || T(sig, SIG_USER_LOAD_BALANCE_MASK))
+#define sig_kernel_specific(sig) \
+ (((sig) < SIGRTMIN) && T(sig, SIG_KERNEL_SPECIFIC_MASK))
#define sig_kernel_broadcast(sig) \
- (T(sig, SIG_KERNEL_BROADCAST_MASK) || ((sig) >= SIGRTMIN))
-#define sig_kernel_only(sig) T(sig, SIG_KERNEL_ONLY_MASK)
-#define sig_kernel_coredump(sig) T(sig, SIG_KERNEL_COREDUMP_MASK)
+ (((sig) >= SIGRTMIN) || T(sig, SIG_KERNEL_BROADCAST_MASK))
+#define sig_kernel_only(sig) \
+ (((sig) < SIGRTMIN) && T(sig, SIG_KERNEL_ONLY_MASK))
+#define sig_kernel_coredump(sig) \
+ (((sig) < SIGRTMIN) && T(sig, SIG_KERNEL_COREDUMP_MASK))

#define sig_user_defined(t, sig) \
(((t)->sig->action[(sig)-1].sa.sa_handler != SIG_DFL) && \


2002-09-16 17:00:23

by Paul Larson

[permalink] [raw]
Subject: Re: [patch] Re: New failures in nightly LTP test

On Sat, 2002-09-14 at 05:30, Ingo Molnar wrote:

> the attached patch (against BK-curr) fixes this bug and a number of others
> in the same class - the signal behavior bitmasks should never be consulted
> before making sure that the signal is in the word range. Paul, does this
> fix all the LTP regressions?
Yes, it worked great. Sorry for the delay, I was away for the weekend.

Thanks,
Paul Larson