Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1867432imu; Thu, 10 Jan 2019 04:30:08 -0800 (PST) X-Google-Smtp-Source: ALg8bN7VbyR0Ogh1jdXJQ8Xr9uVv8fOM7RyTHWYkL0xiWFsy13Z4z0f1lIzLAJK1qPT3tieDxoVI X-Received: by 2002:a63:2784:: with SMTP id n126mr9402782pgn.48.1547123408258; Thu, 10 Jan 2019 04:30:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547123408; cv=none; d=google.com; s=arc-20160816; b=RSNnWhSLFbvVm3NSPZsbYKRbl5YvOK/SrzAB79QPEG2sKVNwvPTM9CsisCELyVYoWZ vWtGUx3ou4w0NItwgj6TBjxmw4NwZfrjBUcoskEQuUIKUH4hONONpQ/0OLV+x8DhhjKV vCA64FA9HTIko486FTT7at4GoHQLidOu8jqLin9WA+Y1vTF9aNiNAEZn8wU7lFPyqJxO GBRkBCFMD9rSsrCpKb7jXuXRen32cjKXudk1TPomdx6/LPDGHoWZXQQNWxpJ+ubaNzJ6 zEx+O61KdeazBVgC/7vOu6HyvJjEOIdMdRiaeINNqxkZRDwP9wBnr8ry0ypa5md4/lBz 9zLQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version; bh=kMaczRLZuY7tddOmSul8f/HtY4zML1PqsSt1bdAC76E=; b=saAIkwo+qSpuJQn/u2SY/6wEl88Y3ItrLhn8WGJuF0dXOGIMrNI6+C4exNPTo8ok20 w1uUQ8bDhjmAoxexAjVaA6H75AQwEXjBV761oJOEEcKgLattxnNsdNiv9ceyhXOdK8/h 7CMhqxt5QTqhFGz+DKFfYtEG076h25WSGKTzTKS+D1g6vQyFOv/JZNZU1lXUL29xpdu7 iecwm3CAmMJxI5lGEuJipiwdJC5BaTfjVGQPtcT2NKnA+60wIvdLRSp2DvNZNquJ/iFY 6f3uQCg1d/H00AitVjBwc21fLtswcXO+tYGo4f3EApLVuywnkGhiw7Bwu7Gbn9aV4118 jtcg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 91si8692323ply.222.2019.01.10.04.29.52; Thu, 10 Jan 2019 04:30:08 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728667AbfAJM0S (ORCPT + 99 others); Thu, 10 Jan 2019 07:26:18 -0500 Received: from mail-qt1-f194.google.com ([209.85.160.194]:41267 "EHLO mail-qt1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727579AbfAJM0R (ORCPT ); Thu, 10 Jan 2019 07:26:17 -0500 Received: by mail-qt1-f194.google.com with SMTP id l12so12293406qtf.8 for ; Thu, 10 Jan 2019 04:26:16 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=kMaczRLZuY7tddOmSul8f/HtY4zML1PqsSt1bdAC76E=; b=RASyQ4GOuHJQ3u/9RBkPH62jW9pyuU3AbWiwHtmh4+G7ao4sF8KkqTG0R0qGjofa/O sxdaClrWzSB3kvcBfXsk4eBCh8+oEW2t+VrKw0gk69N8MUfV8Tcjo7updG9U76ibg7xZ gr49MTIXsmLSpIgXMqurSoXL16Ud9qj2iQ9KEikVl8DntFvbXSYLQw5POMtzuEm0NGot bIdJoaqN7fLOEeRqYmSQ2ZTdTK4ak2vWU5eBMjUH1BUWwiZlPYkJJUnmv4cV/f1biEUB BR3TfNFbpor1OvFIGDphHnXbk3kdpi/1saPCqKudrpaJJ2hqgIAZIY1zr8clZvtQAsb9 2KCw== X-Gm-Message-State: AJcUukdzY2bxIeaJtTiIFt++6rCiqed0aSPnpjhej/AqfYHwSMU3GFHe HBqW2HB9YpgO3ZAO9XJPoz5GNNgJSlnEkVsSYI0= X-Received: by 2002:ac8:1d12:: with SMTP id d18mr9276973qtl.343.1547123176135; Thu, 10 Jan 2019 04:26:16 -0800 (PST) MIME-Version: 1.0 References: <000000000000449587057e1e6f8b@google.com> <49b3b189-a51f-6a97-0e1f-bc3f2c305299@I-love.SAKURA.ne.jp> <62FAC6A3-AC41-44CD-8ABC-79F404BF8CB1@microgate.com> In-Reply-To: From: Arnd Bergmann Date: Thu, 10 Jan 2019 13:25:59 +0100 Message-ID: Subject: Re: [PATCH] tty/n_hdlc: fix __might_sleep warning To: Tetsuo Handa Cc: Greg Kroah-Hartman , Jiri Slaby , Paul Fulghum , "linux-kernel@vger.kernel.org Mailing List" , Alan Cox , syzbot , syzkaller-bugs@googlegroups.com Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jan 10, 2019 at 12:39 PM Tetsuo Handa wrote: > On 2019/01/02 5:28, Paul Fulghum wrote: > > Fix __might_sleep warning in tty/n_hdlc.c read due to copy_to_user call while current is TASK_INTERRUPTIBLE. > > This is a false positive since the code path does not depend on current state remaining TASK_INTERRUPTIBLE. > > The loop breaks out and sets TASK_RUNNING after calling copy_to_user. > > This patch supresses the warning by setting TASK_RUNNING before calling copy_to_user. > > > > [1] https://syzkaller.appspot.com/bug?id=17d5de7f1fcab794cb8c40032f893f52de899324 > > > > Signed-off-by: Paul Fulghum > > Reported-by: syzbot > > Cc: Greg Kroah-Hartman > > Cc: Tetsuo Handa > > Cc: Arnd Bergmann > > Cc: Alan Cox This version looks good to me. Acked-by: Arnd Bergmann Arnd