From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.5 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9F599C433E0 for ; Fri, 12 Feb 2021 12:22:29 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 0C34964E30 for ; Fri, 12 Feb 2021 12:22:28 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0C34964E30 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 3B7228D004D; Fri, 12 Feb 2021 07:22:28 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 366DE8D0015; Fri, 12 Feb 2021 07:22:28 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 255CA8D004D; Fri, 12 Feb 2021 07:22:28 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0029.hostedemail.com [216.40.44.29]) by kanga.kvack.org (Postfix) with ESMTP id 10E3F8D0015 for ; Fri, 12 Feb 2021 07:22:28 -0500 (EST) Received: from smtpin23.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id C7AE8180AD81A for ; Fri, 12 Feb 2021 12:22:27 +0000 (UTC) X-FDA: 77809528734.23.value74_0b0d15d27621 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin23.hostedemail.com (Postfix) with ESMTP id A86A437604 for ; Fri, 12 Feb 2021 12:22:27 +0000 (UTC) X-HE-Tag: value74_0b0d15d27621 X-Filterd-Recvd-Size: 3162 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf05.hostedemail.com (Postfix) with ESMTP for ; Fri, 12 Feb 2021 12:22:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=uLQApXb/sXTlVKThMOmNrm1a3iojPyy3XpzYg3wntEM=; b=AXzAzBHBMaxVXDuzdJwA9TnNM/ mTeOFL4n1b2MA6IriNolnXZG/icgCZ5CstHAW1nylSPSYPiVdkQRjGN0Y82gRq/5Qdd25fzGhc6od y/7PijcW2oAn0B97MkTOO+Tp/b8vjvmRGzn5sqW1XKIHlPeBGVIMSeU3d2c0EObnPikHdGAjtOu6O t5JYjQSGamvNLtgWPwyeFeqGIxOYUyx6mPFYwldFyY/vYzUIlMY817dpaJ7z6GJ6f/2tTcVnmVFaV WZFaptjwAeGmpSjOXRFqEHGwjjPowbDt5P1rxc5oYwan2cfis3qWvTpEhBkQY5b2W7xTl07KBsjcn RGyYUyNw==; Received: from willy by casper.infradead.org with local (Exim 4.94 #2 (Red Hat Linux)) id 1lAXSZ-00Ba2u-Fq; Fri, 12 Feb 2021 12:22:09 +0000 Date: Fri, 12 Feb 2021 12:22:07 +0000 From: Matthew Wilcox To: Tetsuo Handa Cc: Michal Hocko , Jan Kara , Dmitry Vyukov , syzbot , Jan Kara , linux-ext4@vger.kernel.org, LKML , syzkaller-bugs , Theodore Ts'o , Linux-MM Subject: Re: possible deadlock in start_this_handle (2) Message-ID: <20210212122207.GM308988@casper.infradead.org> References: <20210211121020.GO19070@quack2.suse.cz> <20210211125717.GH308988@casper.infradead.org> <20210211132533.GI308988@casper.infradead.org> <20210211142630.GK308988@casper.infradead.org> <9cff0fbf-b6e7-1166-e4ba-d4573aef0c82@i-love.sakura.ne.jp> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <9cff0fbf-b6e7-1166-e4ba-d4573aef0c82@i-love.sakura.ne.jp> X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Fri, Feb 12, 2021 at 08:18:11PM +0900, Tetsuo Handa wrote: > On 2021/02/12 1:41, Michal Hocko wrote: > > But I suspect we have drifted away from the original issue. I thought > > that a simple check would help us narrow down this particular case and > > somebody messing up from the IRQ context didn't sound like a completely > > off. > > > > From my experience at https://lkml.kernel.org/r/201409192053.IHJ35462.JLOMOSOFFVtQFH@I-love.SAKURA.ne.jp , > I think we can replace direct PF_* manipulation with macros which do not receive "struct task_struct *" argument. > Since TASK_PFA_TEST()/TASK_PFA_SET()/TASK_PFA_CLEAR() are for manipulating PFA_* flags on a remote thread, we can > define similar ones for manipulating PF_* flags on current thread. Then, auditing dangerous users becomes easier. No, nobody is manipulating another task's GFP flags.