public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jiri Slaby <jslaby@suse.cz>
To: Peter Hurley <peter@hurleysoftware.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] tty: vt: Fix !TASK_RUNNING diagnostic warning from paste_selection()
Date: Mon, 20 Jul 2015 11:24:39 +0200	[thread overview]
Message-ID: <55ACBE57.1000405@suse.cz> (raw)
In-Reply-To: <1436748455-4310-1-git-send-email-peter@hurleysoftware.com>

On 07/13/2015, 02:47 AM, Peter Hurley wrote:
> Pasting text with gpm on a VC produced warning [1]. Reset task state
> to TASK_RUNNING in the paste_selection() loop, if the loop did not
> sleep.
> 
> [1]
> WARNING: CPU: 6 PID: 1960 at /home/peter/src/kernels/mainline/kernel/sched/core.c:7286 __might_sleep+0x7f/0x90()
> do not call blocking ops when !TASK_RUNNING; state=1 set at [<ffffffff8151805e>] paste_selection+0x9e/0x1a0
...
> Signed-off-by: Peter Hurley <peter@hurleysoftware.com>
> ---
>  drivers/tty/vt/selection.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/tty/vt/selection.c b/drivers/tty/vt/selection.c
> index ea27804..939c4b6 100644
> --- a/drivers/tty/vt/selection.c
> +++ b/drivers/tty/vt/selection.c
> @@ -356,6 +356,7 @@ int paste_selection(struct tty_struct *tty)
>  			schedule();
>  			continue;
>  		}
> +	       __set_current_state(TASK_RUNNING);

It looks like spaces slipped in.

thanks,
-- 
js
suse labs

  reply	other threads:[~2015-07-20  9:24 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-13  0:47 [PATCH] tty: vt: Fix !TASK_RUNNING diagnostic warning from paste_selection() Peter Hurley
2015-07-20  9:24 ` Jiri Slaby [this message]
2015-07-20 16:39   ` Peter Hurley

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=55ACBE57.1000405@suse.cz \
    --to=jslaby@suse.cz \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=peter@hurleysoftware.com \
    /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