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 <pe...@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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to