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] [day] [month] [year] [list]
Message-Id: <201112272253.29446.rjw@sisk.pl>
Date:	Tue, 27 Dec 2011 22:53:29 +0100
From:	"Rafael J. Wysocki" <rjw@...k.pl>
To:	Jeff Layton <jlayton@...hat.com>
Cc:	linux-pm@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] freezer: fix return value of freezable_schedule_timeout_killable

On Saturday, December 24, 2011, Jeff Layton wrote:
> ...it should return the return code from schedule_timeout_killable(),
> not the one from freezer_count().
> 
> All of the current callers ignore the return code so the bug is
> harmless but it's worth fixing.
> 
> Signed-off-by: Jeff Layton <jlayton@...hat.com>

Applied to linux-pm/pm-freezer, will be pushed for 3.3.

Thanks,
Rafael


> ---
>  include/linux/freezer.h |    4 +++-
>  1 files changed, 3 insertions(+), 1 deletions(-)
> 
> diff --git a/include/linux/freezer.h b/include/linux/freezer.h
> index 30f06c2..96b5b59 100644
> --- a/include/linux/freezer.h
> +++ b/include/linux/freezer.h
> @@ -122,9 +122,11 @@ static inline int freezer_should_skip(struct task_struct *p)
>  /* Like schedule_timeout_killable(), but should not block the freezer. */
>  #define freezable_schedule_timeout_killable(timeout)			\
>  ({									\
> +	long __retval;							\
>  	freezer_do_not_count();						\
> -	schedule_timeout_killable(timeout);				\
> +	__retval = schedule_timeout_killable(timeout);			\
>  	freezer_count();						\
> +	__retval;							\
>  })
>  
>  /*
> 

--
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