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 19404C433E0 for ; Fri, 12 Feb 2021 13:13:01 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id B19D364DE3 for ; Fri, 12 Feb 2021 13:13:00 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B19D364DE3 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 356268D005B; Fri, 12 Feb 2021 08:13:00 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 2DF4A8D0057; Fri, 12 Feb 2021 08:13:00 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 1816E8D005B; Fri, 12 Feb 2021 08:13:00 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0041.hostedemail.com [216.40.44.41]) by kanga.kvack.org (Postfix) with ESMTP id F18F28D0057 for ; Fri, 12 Feb 2021 08:12:59 -0500 (EST) Received: from smtpin24.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id AD53A181AF5C2 for ; Fri, 12 Feb 2021 13:12:59 +0000 (UTC) X-FDA: 77809656078.24.work53_5716b0527621 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin24.hostedemail.com (Postfix) with ESMTP id 908AF1A4A0 for ; Fri, 12 Feb 2021 13:12:59 +0000 (UTC) X-HE-Tag: work53_5716b0527621 X-Filterd-Recvd-Size: 3739 Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by imf43.hostedemail.com (Postfix) with ESMTP for ; Fri, 12 Feb 2021 13:12:59 +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=1613135577; 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=DbvD0ELrznZKPnNNl0HUBrOi1DWu0bvse8JkNJGdDRo=; b=iWUAxj11LEJ71+1Jag+ZMLi0QF45zOUDT+PkV4hrxnef9ep1y/LwWZWm2puQMPzZWSVzQq /vESrx8fUz0lfk0F/DuHhwbqCmyzVXJwX4ivVfs/FH9vPX4eJeUixvkVAXkVzkJs1C70LC 9dbq8ImgPU9oxPHscKoH9+GaohBvX9Q= Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id C2C86AC90; Fri, 12 Feb 2021 13:12:57 +0000 (UTC) Date: Fri, 12 Feb 2021 14:12:57 +0100 From: Michal Hocko To: Tetsuo Handa Cc: Matthew Wilcox , 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: <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> <2b90c488-a6b9-2565-bd3a-e4f8bf8404e9@i-love.sakura.ne.jp> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <2b90c488-a6b9-2565-bd3a-e4f8bf8404e9@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 12-02-21 21:58:15, Tetsuo Handa wrote: > On 2021/02/12 21:30, Michal Hocko wrote: > > 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. > > > > No. You are misunderstanding. The bug report above is an example of manipulating PF flags on remote tasks. Could you be more specific? I do not remember there was any theory that somebody is manipulating flags on a remote task. A very vague theory was that an interrupt context might be doing that on the _current_ context but even that is not based on any real evidence. It is a pure speculation. -- Michal Hocko SUSE Labs