lkml.org 
[lkml]   [2011]   [Aug]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: avr32: handle_signal() bug?
On 08/16, Matt Fleming wrote:
>
> On Mon, 2011-08-15 at 22:55 -0700, Håvard Skinnemoen wrote:
> >
> > Thanks for the test. Unfortunately, the result is the same regardless
> > of whether I apply the patches or not. In both cases:
> >
> > /root # ./nodefer
> > SIGUSR2: not blocked
> > SIGTERM: not blocked
>
> Hmm.. that's interesting. I had a quick look through the rest of the
> code in the signal path and couldn't find anything obviously wrong.

Agreed, I am puzzled too.

> The
> only thing that looked suspicious is that you don't clear
> TIF_RESTORE_SIGMASK if you successsfully deliver a signal.

Indeed this is wrong. TIF_RESTORE_SIGMASK should be always cleared,
unless setup_rt_frame/valid_user_regs fails.

> Maybe try
> adding a clear_thread_flag(TIF_RESTORE_SIGMASK); to the success path in
> handle_signal() and see if you get better results?

I will be surprised if this helps with this particular test-case,
but I agree this should be fixed anyway.

> > Your patch doesn't appear to do any harm though, and it looks correct
> > to me. Perhaps there's another bug lurking somewhere as well. Some
> > preliminary debugging makes me suspicious about libc, but I can't tell
> > for sure yet.
>
> Which libc is this by the way?

may be you can run the test-case under strace? On my machine
strace -f -e rt_sigprocmask ./test shows

[pid 25610] --- SIGUSR1 (User defined signal 1) @ 0 (0) ---
[pid 25610] rt_sigprocmask(SIG_BLOCK, NULL, [USR2 TERM], 8) = 0

Oleg.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2011-08-16 17:45    [W:0.534 / U:0.080 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site