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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20111103064215.48939e1a@tlielax.poochiereds.net>
Date:	Thu, 3 Nov 2011 06:42:15 -0400
From:	Jeff Layton <jlayton@...hat.com>
To:	Oleg Nesterov <oleg@...hat.com>
Cc:	Tejun Heo <tj@...nel.org>, "Rafael J. Wysocki" <rjw@...k.pl>,
	Steve French <sfrench@...ba.org>, linux-kernel@...r.kernel.org,
	linux-pm@...r.kernel.org, linux-cifs@...r.kernel.org,
	"J. Bruce Fields" <bfields@...ldses.org>,
	Neil Brown <neilb@...e.de>, trond.myklebust@...app.com,
	linux-nfs@...r.kernel.org
Subject: Re: [PATCH] wait_event_freezekillable: use
 freezer_do_not_count/freezer_count

On Wed, 2 Nov 2011 18:53:27 +0100
Oleg Nesterov <oleg@...hat.com> wrote:

> fake_signal_wake_up() should not wake up the TASK_KILLABLE tasks,
> we are going to fix this. This means that wait_event_freezekillable()
> can't rely on wakeup from freezer. Reimplement it using
> freezer_do_not_count/freezer_count. This is not really nice, just
> a simple fix for now.
> 
> Signed-off-by: Oleg Nesterov <oleg@...hat.com>
> ---
> 
>  include/linux/freezer.h |   10 +++-------
>  1 file changed, 3 insertions(+), 7 deletions(-)
> 
> --- a/include/linux/freezer.h
> +++ b/include/linux/freezer.h
> @@ -143,13 +143,9 @@ static inline void set_freezable_with_si
>  #define wait_event_freezekillable(wq, condition)			\
>  ({									\
>  	int __retval;							\
> -	for (;;) {							\
> -		__retval = wait_event_killable(wq,			\
> -				(condition) || freezing(current));	\
> -		if (__retval || (condition))				\
> -			break;						\
> -		try_to_freeze();					\
> -	}								\
> +	freezer_do_not_count();						\
> +	__retval = wait_event_killable(wq, (condition));		\
> +	freezer_count();						\
>  	__retval;							\
>  })
>  
> 

I'm not sure we really need this macro anymore since this is much
simpler. I could just move cifs back to using wait_event_killable and
simply wrap it in freezer_do_not_count/freezer_count (with some
comments to explain why we're doing that).

In any event, I plan to test this scheme out today and will let you
know whether it works...

Thanks,
-- 
Jeff Layton <jlayton@...hat.com>
--
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