lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 19 Feb 2007 11:50:08 +0100
From:	Pavel Machek <pavel@....cz>
To:	Oleg Nesterov <oleg@...sign.ru>
Cc:	Andrew Morton <akpm@...ux-foundation.org>,
	"Rafael J. Wysocki" <rjw@...k.pl>,
	"Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] fix refrigerator() vs thaw_process() race

Hi!

> refrigerator() can miss a wakeup, "wait event" loop needs a proper memory
> ordering.
> 
> Signed-off-by: Oleg Nesterov <oleg@...sign.ru>
> 
> --- WQ/kernel/power/process.c~WAKE	2007-02-18 22:56:49.000000000 +0300
> +++ WQ/kernel/power/process.c	2007-02-19 01:04:26.000000000 +0300
> @@ -46,8 +46,10 @@ void refrigerator(void)
>  	recalc_sigpending(); /* We sent fake signal, clean it up */
>  	spin_unlock_irq(&current->sighand->siglock);
>  
> -		current->state = TASK_UNINTERRUPTIBLE;
> +		set_current_state(TASK_UNINTERRUPTIBLE);


Looks okay to me... but this one liner would be exactly as effective,
right?

								Pavel

>  		schedule();
>  	}
>  	pr_debug("%s left refrigerator\n", current->comm);

-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ