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 C4BBBC2BA2B for ; Tue, 14 Apr 2020 03:32:49 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 8C14620644 for ; Tue, 14 Apr 2020 03:32:49 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8C14620644 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 216B78E0003; Mon, 13 Apr 2020 23:32:49 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 1A0FF8E0001; Mon, 13 Apr 2020 23:32:49 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 0688D8E0003; Mon, 13 Apr 2020 23:32:48 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0209.hostedemail.com [216.40.44.209]) by kanga.kvack.org (Postfix) with ESMTP id DF1098E0001 for ; Mon, 13 Apr 2020 23:32:48 -0400 (EDT) Received: from smtpin15.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id A17313A92 for ; Tue, 14 Apr 2020 03:32:48 +0000 (UTC) X-FDA: 76705038816.15.view52_187faec3d0f35 X-HE-Tag: view52_187faec3d0f35 X-Filterd-Recvd-Size: 4197 Received: from mail-pl1-f195.google.com (mail-pl1-f195.google.com [209.85.214.195]) by imf16.hostedemail.com (Postfix) with ESMTP for ; Tue, 14 Apr 2020 03:32:48 +0000 (UTC) Received: by mail-pl1-f195.google.com with SMTP id y12so3865189pll.2 for ; Mon, 13 Apr 2020 20:32:48 -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=ArgnOF6jLXpb/Aiqzc0Aon2OsGQE4oCrOJZfbEaRH+I=; b=LMrKPJ/dXyFdQfUl7tFLaMXVVy1YjcRrA7QkKFrJxJIah21ULADJrr79OsTZjFmCmf +EXMq/IF0R0RjpRJq6b4xMQyjeHDSi1271HaWJnBT+Q38WnK9JtXVJtwRNjNhQxG6e12 8YgAuoUFmpMJO6afkrDW8QlIFmwMGcOyi0cx7CG7gNc77wZZG2yXAWDLit1zOSgBScTI rC2bVn6qMW78iaD5DSXfNnffSwduMPxRdv96LqWW57loXodyiSvkTRx5gdWIMlsHafbz l7l2CDpEPfgf1Oj7qzZSqctt7GIYiEP7lmMphaOfqzhaJvDU7KOt2YFy15nuFfH7rHzv 2tBw== X-Gm-Message-State: AGi0PuZJxs/Ped1U9BxsWh5u/TuTkShRxkWJuYvLBU7rNqYTjMaeLCRY LMRgwIFJo8OcQvjHzAbzAvr6WXk/Zqc= X-Google-Smtp-Source: APiQypID3YxvbyG2BHdjJhI/9Ccmf+GO9Qf3+pzzIuUIxcf0WguocjZaoZm68OvUVdP61Q4w8oVZnQ== X-Received: by 2002:a17:902:bc48:: with SMTP id t8mr2486948plz.311.1586835167370; Mon, 13 Apr 2020 20:32:47 -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 u8sm2686875pjy.16.2020.04.13.20.32.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Apr 2020 20:32:46 -0700 (PDT) Received: by 42.do-not-panic.com (Postfix, from userid 1000) id 757DF40277; Tue, 14 Apr 2020 03:32:44 +0000 (UTC) Date: Tue, 14 Apr 2020 03:32:44 +0000 From: Luis Chamberlain To: Bart Van Assche Cc: axboe@kernel.dk, viro@zeniv.linux.org.uk, gregkh@linuxfoundation.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: [RFC v2 2/5] blktrace: fix debugfs use after free Message-ID: <20200414033244.GN11244@42.do-not-panic.com> References: <20200409214530.2413-1-mcgrof@kernel.org> <20200409214530.2413-3-mcgrof@kernel.org> <88f94070-cd34-7435-9175-e0518a7d7db8@acm.org> <20200410195805.GM11244@42.do-not-panic.com> <0837b27e-e07b-b61c-5842-00cdf78873ca@acm.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <0837b27e-e07b-b61c-5842-00cdf78873ca@acm.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 Sat, Apr 11, 2020 at 04:09:13PM -0700, Bart Van Assche wrote: > On 2020-04-10 12:58, Luis Chamberlain wrote: > > On Thu, Apr 09, 2020 at 07:52:59PM -0700, Bart Van Assche wrote: > >> On 2020-04-09 14:45, Luis Chamberlain wrote: > >>> +void blk_q_debugfs_register(struct request_queue *q) > >>> +{ > >>> + q->debugfs_dir = debugfs_create_dir(kobject_name(q->kobj.parent), > >>> + blk_debugfs_root); > >>> +} > >>> + > >>> +void blk_q_debugfs_unregister(struct request_queue *q) > >>> +{ > >>> + debugfs_remove_recursive(q->debugfs_dir); > >>> + q->debugfs_dir = NULL; > >>> +} > >> > >> There are no other functions in the block layer that start with the > >> prefix blk_q_. How about changing that prefix into blk_? > > > > I the first patch already introduced blk_debugfs_register(), so I have > > now changed the above to: > > > > blk_debugfs_common_register() > > blk_debugfs_common_unregister() > > > > Let me know if something else is preferred. > > I just realized that the "q" in "blk_q_" probably refers to the word > "queue"? How about renaming these funtions into > blk_queue_debugfs_register/unregister()? Sure. Luis