Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753486AbbGTJYp (ORCPT ); Mon, 20 Jul 2015 05:24:45 -0400 Received: from mail-wg0-f49.google.com ([74.125.82.49]:34844 "EHLO mail-wg0-f49.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751878AbbGTJYn (ORCPT ); Mon, 20 Jul 2015 05:24:43 -0400 Subject: Re: [PATCH] tty: vt: Fix !TASK_RUNNING diagnostic warning from paste_selection() To: Peter Hurley , Greg Kroah-Hartman References: <1436748455-4310-1-git-send-email-peter@hurleysoftware.com> Cc: linux-kernel@vger.kernel.org From: Jiri Slaby Message-ID: <55ACBE57.1000405@suse.cz> Date: Mon, 20 Jul 2015 11:24:39 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.1.0 MIME-Version: 1.0 In-Reply-To: <1436748455-4310-1-git-send-email-peter@hurleysoftware.com> Content-Type: text/plain; charset=iso-8859-2 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1199 Lines: 35 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 [] paste_selection+0x9e/0x1a0 ... > Signed-off-by: Peter Hurley > --- > 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 majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/