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 DB849C433E0 for ; Wed, 10 Jun 2020 21:09:25 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 952BC20760 for ; Wed, 10 Jun 2020 21:09:25 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 952BC20760 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 0F4F98D0048; Wed, 10 Jun 2020 17:09:25 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 0A5CA8D0033; Wed, 10 Jun 2020 17:09:25 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id ED7428D0048; Wed, 10 Jun 2020 17:09:24 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0105.hostedemail.com [216.40.44.105]) by kanga.kvack.org (Postfix) with ESMTP id D2E508D0033 for ; Wed, 10 Jun 2020 17:09:24 -0400 (EDT) Received: from smtpin20.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 9342EF9B97 for ; Wed, 10 Jun 2020 21:09:24 +0000 (UTC) X-FDA: 76914543048.20.value80_3d0ccbd26dce Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin20.hostedemail.com (Postfix) with ESMTP id 6C2E71814D388 for ; Wed, 10 Jun 2020 21:09:20 +0000 (UTC) X-HE-Tag: value80_3d0ccbd26dce X-Filterd-Recvd-Size: 4203 Received: from mail-pg1-f195.google.com (mail-pg1-f195.google.com [209.85.215.195]) by imf41.hostedemail.com (Postfix) with ESMTP for ; Wed, 10 Jun 2020 21:09:19 +0000 (UTC) Received: by mail-pg1-f195.google.com with SMTP id d10so1534106pgn.4 for ; Wed, 10 Jun 2020 14:09:19 -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=d8BFYFKBmzV6dUdQ9QzQfynNSFZ6LYMbzbQZFvp4F6I=; b=rkTaCE6P84mpdlKWdoGkQVFaEZ88y0pqkq/P7ShAJHGudfBDOHZ/UUsddx/OQbwWIg GVrn1f6O3HITCQwAfRsVWVVINYFxe4r1T+irZYBjCF+6PpnmCk3GHb7ihtLqmHu2yMCG e0X9FrAcaYguy6H2NjCJQXGs80594SBcZYyorJzUBckvmS2vtCcJxfrlw7xqeXWykRBc N8AzElWcrks2yuoAeyQUp9btA4WPoN9q5iSxh7M2bCEHcDODPmuR8I6AA/mFEJqWsKYq hHuyfC7AnUK+1QXpZZMpPX7pntEt5sPmh/Y80/OI1gZ8aDemMBs7CXm0KZkXpIVm5umv I97w== X-Gm-Message-State: AOAM5325S4akKOLOSixrLvtnNAn7LY9L0ZPdS+oQ9ZBpGmTVdgpTFYTt EQncfkwOh9uYP62uaJpIdGo= X-Google-Smtp-Source: ABdhPJy9+lD7U4qc9JUoiPb50Gv6ycU7LoqiwDQKy43ONOw5V4yjlKfcEJcOV9smlWXvgROS3QWcPg== X-Received: by 2002:a65:64c1:: with SMTP id t1mr4240625pgv.247.1591823358925; Wed, 10 Jun 2020 14:09:18 -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 h3sm636371pgk.67.2020.06.10.14.09.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Jun 2020 14:09:17 -0700 (PDT) Received: by 42.do-not-panic.com (Postfix, from userid 1000) id 26EE5403AB; Wed, 10 Jun 2020 21:09:17 +0000 (UTC) Date: Wed, 10 Jun 2020 21:09:17 +0000 From: Luis Chamberlain To: Christoph Hellwig Cc: Jan Kara , axboe@kernel.dk, viro@zeniv.linux.org.uk, bvanassche@acm.org, gregkh@linuxfoundation.org, rostedt@goodmis.org, mingo@redhat.com, ming.lei@redhat.com, nstange@suse.de, akpm@linux-foundation.org, mhocko@suse.com, yukuai3@huawei.com, martin.petersen@oracle.com, jejb@linux.ibm.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 v6 6/6] blktrace: fix debugfs use after free Message-ID: <20200610210917.GH11244@42.do-not-panic.com> References: <20200608170127.20419-1-mcgrof@kernel.org> <20200608170127.20419-7-mcgrof@kernel.org> <20200609150602.GA7111@infradead.org> <20200609172922.GP11244@42.do-not-panic.com> <20200609173218.GA7968@infradead.org> <20200609175359.GR11244@42.do-not-panic.com> <20200610064234.GB24975@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200610064234.GB24975@infradead.org> User-Agent: Mutt/1.10.1 (2018-07-13) X-Rspamd-Queue-Id: 6C2E71814D388 X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam03 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000001, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Tue, Jun 09, 2020 at 11:42:34PM -0700, Christoph Hellwig wrote: > On Tue, Jun 09, 2020 at 05:53:59PM +0000, Luis Chamberlain wrote: > > > Feel free to add more comments, but please try to keep them short > > > and crisp. At the some point long comments really distract from what > > > is going on. > > > > Sure. > > > > Come to think of it, given the above, I think we can also do way with > > the the partition stuff too, and rely on the buts->name too. I'll try > > this out, and test it. > > Yes, the sg path should work for partitions as well. That should not > only simplify the code, but also the comments, we can do something like > the full patch below (incorporating your original one). Indeed I ended up with something similar, will use this variation. > This doesn't > include the error check on the creation - I think that check probably > is a good idea for this case based on the comments in the old patch, but > also a separate issue that should go into another patch on top. Makes sense. Luis