lkml.org 
[lkml]   [2011]   [Aug]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 12/16] freezer: clean up freeze_processes() failure path
On 08/19, Tejun Heo wrote:
>
> void __thaw_task(struct task_struct *p)
> {
> unsigned long flags;
> @@ -150,11 +135,19 @@ void __thaw_task(struct task_struct *p)
> * be visible to @p as waking up implies wmb. Waking up inside
> * freezer_lock also prevents wakeups from leaking outside
> * refrigerator.
> + *
> + * If !FROZEN, @p hasn't reached refrigerator, recalc sigpending to
> + * avoid leaving dangling TIF_SIGPENDING behind.
> */
> spin_lock_irqsave(&freezer_lock, flags);
> clear_freeze_flag(p);
> - if (frozen(p))
> + if (frozen(p)) {
> wake_up_process(p);
> + } else {
> + spin_lock(&p->sighand->siglock);
> + recalc_sigpending_and_wake(p);

This was copied from cancel_, yes. but what this
recalc_sigpending_and_wake() can or should do?

It looks simply pointless. It can't clear TIF_SIGPENDING,
it can only do the unneeded/spurious wake_up(INTERRUPTIBLE).

Oleg.



\
 
 \ /
  Last update: 2011-08-28 20:15    [W:0.282 / U:0.492 seconds]
©2003-2014 Jasper Spaans. Advertise on this site