lkml.org 
[lkml]   [2011]   [Aug]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 37/41] autofs4: Use set_current_blocked()
On 08/11, Matt Fleming wrote:
>
> As described in e6fa16ab ("signal: sigprocmask() should do
> retarget_shared_pending()") the modification of current->blocked is
> incorrect as we need to check whether the signal we're about to block
> is pending in the shared queue.

ACK.


cough, can't resist...

> @@ -458,21 +458,16 @@ int autofs4_wait(struct autofs_sb_info *sbi, struct dentry *dentry,
> */
> if (wq->name.name) {
> /* Block all but "shutdown" signals while waiting */
> - sigset_t oldset;
> + sigset_t oldset, blocked;
> unsigned long irqflags;
>
> - spin_lock_irqsave(&current->sighand->siglock, irqflags);
> oldset = current->blocked;
> - siginitsetinv(&current->blocked, SHUTDOWN_SIGS & ~oldset.sig[0]);
> - recalc_sigpending();
> - spin_unlock_irqrestore(&current->sighand->siglock, irqflags);
> + siginitsetinv(&blocked, SHUTDOWN_SIGS & ~oldset.sig[0]);
> + set_current_blocked(&blocked);
>
> wait_event_interruptible(wq->queue, wq->name.name == NULL);
> -
> - spin_lock_irqsave(&current->sighand->siglock, irqflags);
> - current->blocked = oldset;
> - recalc_sigpending();
> - spin_unlock_irqrestore(&current->sighand->siglock, irqflags);
> +

this adds the trailing whitespaces ;)

Oleg.



\
 
 \ /
  Last update: 2011-08-16 19:53    [W:0.205 / U:0.900 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site