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=-2.5 required=3.0 tests=MAILING_LIST_MULTI, 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 9E420C5518B for ; Wed, 22 Apr 2020 07:34:52 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 5C67E206A1 for ; Wed, 22 Apr 2020 07:34:52 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5C67E206A1 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 097FA8E0005; Wed, 22 Apr 2020 03:34:52 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 021398E0003; Wed, 22 Apr 2020 03:34:51 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id E03EB8E0005; Wed, 22 Apr 2020 03:34:51 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0091.hostedemail.com [216.40.44.91]) by kanga.kvack.org (Postfix) with ESMTP id C5C738E0003 for ; Wed, 22 Apr 2020 03:34:51 -0400 (EDT) Received: from smtpin05.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 8A4FF180AD817 for ; Wed, 22 Apr 2020 07:34:51 +0000 (UTC) X-FDA: 76734679182.05.cub74_81b29d6e93d19 X-HE-Tag: cub74_81b29d6e93d19 X-Filterd-Recvd-Size: 4067 Received: from mail-pg1-f194.google.com (mail-pg1-f194.google.com [209.85.215.194]) by imf31.hostedemail.com (Postfix) with ESMTP for ; Wed, 22 Apr 2020 07:34:51 +0000 (UTC) Received: by mail-pg1-f194.google.com with SMTP id o10so667730pgb.6 for ; Wed, 22 Apr 2020 00:34:51 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=xv3CClgNM59iAjDs4jAyjCmiyK+zMtMkYtDjchx4A/4=; b=bK5P969ttyfDf7GYWm9Wn+zm92Lql4b/4/RXsHkeHTSa91/EYYOBIctH/q+i74ZWa+ noC5gH4Qxps0rkjaOwsj6v2JCYUzo/OOid4tmuxFDeynjLrPEXzr5lNQaXkno1AaG2m0 FcVLBAIfAQVDkhnuiZnhl9H0TTXEK1rTyw4iZwFafZvebPtVRY7I92HrhyyZbtFVehRg 8hZnUK+SU3Fc84DrGeWRu0/LkDp6PtY4XdzEOWI5QGJkgiZB6BRY/px/w9cJGlpv1MmP 6dXLOx3S2qnK5XWxJSb6TVnCxz9xWww41a0roNCK5idU9rhFhFvAgdC2zFBvkEWBfR+P uZcQ== X-Gm-Message-State: AGi0PuZyIae9UdNrMWnBKpipP+VC5a23hbIbfA6zI1EYF9qYz1vVaWR0 jo1If2MCxYJrlP04DHA6SdE= X-Google-Smtp-Source: APiQypIMihueeTQ943/uTYtrvog7ersMvpf7K7XYY8myv59EdZuGEtFE1ttqG91Zu2F3zNVNy168tQ== X-Received: by 2002:a62:1bd0:: with SMTP id b199mr25631509pfb.283.1587540890239; Wed, 22 Apr 2020 00:34:50 -0700 (PDT) Received: from 42.do-not-panic.com (42.do-not-panic.com. [157.230.128.187]) by smtp.gmail.com with ESMTPSA id a13sm4534042pjq.0.2020.04.22.00.34.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Apr 2020 00:34:49 -0700 (PDT) Received: by 42.do-not-panic.com (Postfix, from userid 1000) id 64CC1402A1; Wed, 22 Apr 2020 07:34:48 +0000 (UTC) Date: Wed, 22 Apr 2020 07:34:48 +0000 From: Luis Chamberlain To: Christoph Hellwig Cc: Greg KH , axboe@kernel.dk, viro@zeniv.linux.org.uk, bvanassche@acm.org, rostedt@goodmis.org, mingo@redhat.com, jack@suse.cz, ming.lei@redhat.com, nstange@suse.de, akpm@linux-foundation.org, mhocko@suse.com, yukuai3@huawei.com, linux-block@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, Omar Sandoval , Hannes Reinecke , Michal Hocko , syzbot+603294af2d01acfdd6da@syzkaller.appspotmail.com Subject: Re: [PATCH v2 03/10] blktrace: fix debugfs use after free Message-ID: <20200422073448.GR11244@42.do-not-panic.com> References: <20200419194529.4872-1-mcgrof@kernel.org> <20200419194529.4872-4-mcgrof@kernel.org> <20200420201615.GC302402@kroah.com> <20200420204156.GO11244@42.do-not-panic.com> <20200422072942.GD19116@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200422072942.GD19116@infradead.org> User-Agent: Mutt/1.10.1 (2018-07-13) 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 Wed, Apr 22, 2020 at 12:29:42AM -0700, Christoph Hellwig wrote: > On Mon, Apr 20, 2020 at 08:41:56PM +0000, Luis Chamberlain wrote: > > Its already there. And yes, after my changes it is technically possible > > to just re-use it directly. But this is complicated by a few things. One > > is that at this point in time, asynchronous request_queue removal is > > still possible, and so a race was exposed where a requeust_queue may be > > lingering but its old device is gone. That race is fixed by reverting us > > back to synchronous request_queue removal, therefore ensuring that the > > debugfs dir exists so long as the device does. > > > > I can remove the debugfs_lookup() *after* we revert to synchronous > > request_queue removal, or we just re-order the patches so that the > > revert happens first. That should simplify this patch. > > Yes, please move the synchronous removal first instead of working around > the current problems. Sounds good. At first it was questionable, now its understood we need it. Luis