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=-5.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,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 28246C433E0 for ; Fri, 12 Feb 2021 12:30:36 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 870E764E2A for ; Fri, 12 Feb 2021 12:30:35 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 870E764E2A Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=suse.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 0BA148D004E; Fri, 12 Feb 2021 07:30:35 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 069BB8D0015; Fri, 12 Feb 2021 07:30:35 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id E4BFE8D004E; Fri, 12 Feb 2021 07:30:34 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0172.hostedemail.com [216.40.44.172]) by kanga.kvack.org (Postfix) with ESMTP id CBC268D0015 for ; Fri, 12 Feb 2021 07:30:34 -0500 (EST) Received: from smtpin17.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 8495A585F for ; Fri, 12 Feb 2021 12:30:34 +0000 (UTC) X-FDA: 77809549188.17.sound17_140b73627621 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin17.hostedemail.com (Postfix) with ESMTP id 657F1180D0181 for ; Fri, 12 Feb 2021 12:30:34 +0000 (UTC) X-HE-Tag: sound17_140b73627621 X-Filterd-Recvd-Size: 3162 Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by imf19.hostedemail.com (Postfix) with ESMTP for ; Fri, 12 Feb 2021 12:30:33 +0000 (UTC) X-Virus-Scanned: by amavisd-new at test-mx.suse.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1613133032; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=5qj3DCkH6KSXjLCqZi9x6XmR8kpK5XSIPuFj/6qx+Dk=; b=GJdLO7vNuHU5kY/jx531qhdurR1ot+bvUV9wWhO8u2XWIGldELlfyLJidkMmSdnPn3rWEg Moy4uqup9gTrdN6ugKLmIc1sLfAdJJavfJxHaFkN9mXOkRRLSo/w7zH5E4LOqpxOq0yXKc iha7zSMFZfbcfuMcpheYvZOAM7Sqf1M= Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 8B501AC69; Fri, 12 Feb 2021 12:30:32 +0000 (UTC) Date: Fri, 12 Feb 2021 13:30:31 +0100 From: Michal Hocko To: Matthew Wilcox Cc: Tetsuo Handa , 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: 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> <20210212122207.GM308988@casper.infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210212122207.GM308988@casper.infradead.org> 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 12-02-21 12:22:07, Matthew Wilcox wrote: > 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. Agreed. And nobody should be manipulating PF flags on remote tasks either. -- Michal Hocko SUSE Labs