mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Rafael J. Wysocki" <rjw@sisk.pl>
To: Jeff Layton <jlayton@redhat.com>
Cc: linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] freezer: fix return value of freezable_schedule_timeout_killable
Date: Tue, 27 Dec 2011 22:53:29 +0100	[thread overview]
Message-ID: <201112272253.29446.rjw@sisk.pl> (raw)
In-Reply-To: <1324692054-5424-1-git-send-email-jlayton@redhat.com>

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@redhat.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;							\
>  })
>  
>  /*
> 


      reply	other threads:[~2011-12-27 21:50 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-24  2:00 Jeff Layton
2011-12-27 21:53 ` Rafael J. Wysocki [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201112272253.29446.rjw@sisk.pl \
    --to=rjw@sisk.pl \
    --cc=jlayton@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®