lkml.org 
[lkml]   [2011]   [Aug]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH v2 07/43] blackfin: Use set_current_blocked() and block_sigmask()
On Sat, Aug 20, 2011 at 04:36, Matt Fleming wrote:
> On Sat, 2011-08-20 at 00:00 -0400, Mike Frysinger wrote:
>> On Fri, Aug 19, 2011 at 12:46, Matt Fleming wrote:
>> > --- a/arch/blackfin/kernel/signal.c
>> > +++ b/arch/blackfin/kernel/signal.c
>> > -       if (ret == 0) {
>> > -               spin_lock_irq(&current->sighand->siglock);
>> > -               sigorsets(&current->blocked, &current->blocked,
>> > -                         &ka->sa.sa_mask);
>> > -               if (!(ka->sa.sa_flags & SA_NODEFER))
>> > -                       sigaddset(&current->blocked, sig);
>> > -               recalc_sigpending();
>> > -               spin_unlock_irq(&current->sighand->siglock);
>> > -       }
>> > +       if (ret == 0)
>> > +               block_sigmask(ka, sig);
>>
>> the Blackfin version holds siglock and calls recalc_sigpending() while
>> block_sigmask() does neither.  i'm guessing that is expected behavior
>> now ?
>
> Yah, set_current_blocked() inside of block_sigmask() still grabs siglock
> and calls recalc_sigpending() for you. Reading current->blocked inside
> of block_sigmask() is fine and the sigorsets() is OK because we're
> modifying a stack variable, so only grabbing the lock inside of
> set_current_blocked() is safe.

thanks for clearing that up (and the code itself!).

Acked-by: Mike Frysinger <vapier@gentoo.org>
-mike
--
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-20 19:35    [W:0.063 / U:1.480 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site