mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Oleg Nesterov <oleg@redhat.com>
To: Davidlohr Bueso <dave@stgolabs.net>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	linux-kernel@vger.kernel.org, Davidlohr Bueso <dbueso@suse.de>
Subject: Re: [PATCH 3/3] signal: use current->state helpers
Date: Thu, 15 Jan 2015 20:43:17 +0100	[thread overview]
Message-ID: <20150115194316.GB28727@redhat.com> (raw)
In-Reply-To: <1421305154-14788-3-git-send-email-dave@stgolabs.net>

On 01/14, Davidlohr Bueso wrote:
>
> Call __set_current_state() instead of assigning the new state directly.
> These interfaces also aid CONFIG_DEBUG_ATOMIC_SLEEP environments, keeping
> track of who changed the state.

Acked-by: Oleg Nesterov <oleg@redhat.com>

> Signed-off-by: Davidlohr Bueso <dbueso@suse.de>
> Cc: Oleg Nesterov <oleg@redhat.com>
> ---
>  kernel/signal.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/kernel/signal.c b/kernel/signal.c
> index 33a5275..a390499 100644
> --- a/kernel/signal.c
> +++ b/kernel/signal.c
> @@ -3550,7 +3550,7 @@ SYSCALL_DEFINE2(signal, int, sig, __sighandler_t, handler)
>  SYSCALL_DEFINE0(pause)
>  {
>  	while (!signal_pending(current)) {
> -		current->state = TASK_INTERRUPTIBLE;
> +		__set_current_state(TASK_INTERRUPTIBLE);
>  		schedule();
>  	}
>  	return -ERESTARTNOHAND;
> @@ -3563,7 +3563,7 @@ int sigsuspend(sigset_t *set)
>  	current->saved_sigmask = current->blocked;
>  	set_current_blocked(set);
>  
> -	current->state = TASK_INTERRUPTIBLE;
> +	__set_current_state(TASK_INTERRUPTIBLE);
>  	schedule();
>  	set_restore_sigmask();
>  	return -ERESTARTNOHAND;
> -- 
> 2.1.2
> 


      reply	other threads:[~2015-01-15 19:44 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-15  6:59 [PATCH 1/3] ipc,sem: " Davidlohr Bueso
2015-01-15  6:59 ` [PATCH 2/3] jbd: drop jbd_ENOSYS debug Davidlohr Bueso
2015-01-15  9:34   ` Jan Kara
2015-01-15  6:59 ` [PATCH 3/3] signal: use current->state helpers Davidlohr Bueso
2015-01-15 19:43   ` Oleg Nesterov [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=20150115194316.GB28727@redhat.com \
    --to=oleg@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=dave@stgolabs.net \
    --cc=dbueso@suse.de \
    --cc=linux-kernel@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®