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.4 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE, SPF_PASS,USER_AGENT_SANE_1 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 E8C91C433E0 for ; Fri, 12 Feb 2021 13:36:33 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 3737364DEA for ; Fri, 12 Feb 2021 13:36:33 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3737364DEA Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=i-love.sakura.ne.jp Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 7D2D88D005E; Fri, 12 Feb 2021 08:36:32 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 7839E8D0057; Fri, 12 Feb 2021 08:36:32 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 64C408D005E; Fri, 12 Feb 2021 08:36:32 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0246.hostedemail.com [216.40.44.246]) by kanga.kvack.org (Postfix) with ESMTP id 502058D0057 for ; Fri, 12 Feb 2021 08:36:32 -0500 (EST) Received: from smtpin13.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 148731808F543 for ; Fri, 12 Feb 2021 13:36:32 +0000 (UTC) X-FDA: 77809715424.13.frog51_530432f27621 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin13.hostedemail.com (Postfix) with ESMTP id E8B7818140B69 for ; Fri, 12 Feb 2021 13:36:31 +0000 (UTC) X-HE-Tag: frog51_530432f27621 X-Filterd-Recvd-Size: 4338 Received: from www262.sakura.ne.jp (www262.sakura.ne.jp [202.181.97.72]) by imf14.hostedemail.com (Postfix) with ESMTP for ; Fri, 12 Feb 2021 13:36:30 +0000 (UTC) Received: from fsav104.sakura.ne.jp (fsav104.sakura.ne.jp [27.133.134.231]) by www262.sakura.ne.jp (8.15.2/8.15.2) with ESMTP id 11CDYQpr053608; Fri, 12 Feb 2021 22:34:26 +0900 (JST) (envelope-from penguin-kernel@i-love.sakura.ne.jp) Received: from www262.sakura.ne.jp (202.181.97.72) by fsav104.sakura.ne.jp (F-Secure/fsigk_smtp/550/fsav104.sakura.ne.jp); Fri, 12 Feb 2021 22:34:26 +0900 (JST) X-Virus-Status: clean(F-Secure/fsigk_smtp/550/fsav104.sakura.ne.jp) Received: from [192.168.1.9] (M106072142033.v4.enabler.ne.jp [106.72.142.33]) (authenticated bits=0) by www262.sakura.ne.jp (8.15.2/8.15.2) with ESMTPSA id 11CDYPIM053602 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NO); Fri, 12 Feb 2021 22:34:25 +0900 (JST) (envelope-from penguin-kernel@i-love.sakura.ne.jp) Subject: Re: possible deadlock in start_this_handle (2) To: Michal Hocko Cc: Matthew Wilcox , Jan Kara , Dmitry Vyukov , syzbot , Jan Kara , linux-ext4@vger.kernel.org, LKML , syzkaller-bugs , "Theodore Ts'o" , Linux-MM 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> From: Tetsuo Handa Message-ID: Date: Fri, 12 Feb 2021 22:34:23 +0900 User-Agent: Mozilla/5.0 (Windows NT 6.3; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.7.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit 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 2021/02/12 22:12, Michal Hocko wrote: > 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. > Please read the link above. The report is an example of manipulating PF flags on a remote task. You are thinking interrupt context as the only possible culprit, but you should also think concurrent access as the other possible culprit.