Message ID | 20221019033602.752383-4-yebin@huaweicloud.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4ac7:0:0:0:0:0 with SMTP id y7csp104587wrs; Tue, 18 Oct 2022 20:20:56 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5xQQzelNjd3rlY143yO0bcLf6gyEYoq60xM92JmGcIO0qWQVrYb2BGkys+b+90o/9X570F X-Received: by 2002:a17:902:cf08:b0:17d:46b6:25f9 with SMTP id i8-20020a170902cf0800b0017d46b625f9mr6273279plg.67.1666149645967; Tue, 18 Oct 2022 20:20:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666149645; cv=none; d=google.com; s=arc-20160816; b=g3uMKUMdJVCnSZ+bmp0w+8nckRJEMroRbgEvHbrVy5StHKJ2nO8iELHj4inripTsRn 1iajXpeMH62mvkmnpAMwR4HkS27XZIgtY9JG9mX1+mD3M8wX3+vyCQ/jZbi6OdxbfSpM OU9zpA7aAChJElgLtM8oPwvEkHmZLIdgQHXoaDut8AH699MISarEoWxWeELpmmdF9Y5k 5iwGiy+0bsjHORLVmjXpJ5juXrM5Mr6FPKvt/2TbkLEfMnEKmt6fudhYffl7BHeerc7P nGPYRNO//ayJbu1DJrOBAWQA+U3xoJJXD1T3M+wVPKQB1YQUc+zGGZOSMYyWzX+l4NY3 9H6Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=4U+OfrboN8P+b+LqukCbwQhVfnWWowQJJ+wAfWNGgNU=; b=UwTaILwUtHMygCdTKlIv69GIjrk4s7H/j1P/SfTBpWt38EKxM7D5DOIecGdFn5VVax P7q6hKOiMcPcfPEndktthxZ/Kk2qshF+y/74iTvRpBKyZmj8iZCMQN87OFrZd92Qtfrr uGTVHTZbfvPAGtHfj/4a8IO2ahaffHc16BAhcGi8sSUmxU5Dya8A3dNy3FCVQKylxFGk BqAgb/hRy6gLi9fMCqLiiiT0cAgpRmmh4Wr48ZlvUTLsV5DZlzZDYWWo5Zvcp78qdoU0 aJP4WoGwxB81p6tWLCtbNnL0endqpBReFzyezWSRHJ9sgbXZeMWdghI4yE3LlY5EICHx N+sw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n15-20020a170902f60f00b0017f8290fcf0si17088564plg.272.2022.10.18.20.20.33; Tue, 18 Oct 2022 20:20:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229908AbiJSDOR (ORCPT <rfc822;samuel.l.nystrom@gmail.com> + 99 others); Tue, 18 Oct 2022 23:14:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44432 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229783AbiJSDOG (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Tue, 18 Oct 2022 23:14:06 -0400 Received: from dggsgout11.his.huawei.com (dggsgout11.his.huawei.com [45.249.212.51]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 79C35A8345; Tue, 18 Oct 2022 20:14:04 -0700 (PDT) Received: from mail02.huawei.com (unknown [172.30.67.153]) by dggsgout11.his.huawei.com (SkyGuard) with ESMTP id 4MsbPF57Kkzl7tB; Wed, 19 Oct 2022 11:12:01 +0800 (CST) Received: from huaweicloud.com (unknown [10.175.127.227]) by APP4 (Coremail) with SMTP id gCh0CgDnLS53a09jvmtUAA--.10775S7; Wed, 19 Oct 2022 11:14:02 +0800 (CST) From: Ye Bin <yebin@huaweicloud.com> To: axboe@kernel.dk, rostedt@goodmis.org, mhiramat@kernel.org, linux-block@vger.kernel.org Cc: linux-kernel@vger.kernel.org, yebin@huaweicloud.com, Ye Bin <yebin10@huawei.com> Subject: [PATCH v3 3/3] blktrace: remove unnessary stop block trace in 'blk_trace_shutdown' Date: Wed, 19 Oct 2022 11:36:02 +0800 Message-Id: <20221019033602.752383-4-yebin@huaweicloud.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20221019033602.752383-1-yebin@huaweicloud.com> References: <20221019033602.752383-1-yebin@huaweicloud.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-CM-TRANSID: gCh0CgDnLS53a09jvmtUAA--.10775S7 X-Coremail-Antispam: 1UD129KBjvdXoWrtrW5uryrXFWktw1UGF1xKrg_yoWfuFc_A3 WUW3WkGr1fGr9Yvr4fJF4fXw1qqrnFqFy8ua4jyrW5Aw1DXF95JanxJFs0gr90va1DWF9r Zry3Jwn7J3Z0yjkaLaAFLSUrUUUUUb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUIcSsGvfJTRUUUb-xFF20E14v26rWj6s0DM7CY07I20VC2zVCF04k26cxKx2IYs7xG 6r1j6r18M7CIcVAFz4kK6r1j6r18M28IrcIa0xkI8VA2jI8067AKxVWUWwA2048vs2IY02 0Ec7CjxVAFwI0_Xr0E3s1l8cAvFVAK0II2c7xJM28CjxkF64kEwVA0rcxSw2x7M28EF7xv wVC0I7IYx2IY67AKxVWDJVCq3wA2z4x0Y4vE2Ix0cI8IcVCY1x0267AKxVWxJr0_GcWl84 ACjcxK6I8E87Iv67AKxVW0oVCq3wA2z4x0Y4vEx4A2jsIEc7CjxVAFwI0_GcCE3s1le2I2 62IYc4CY6c8Ij28IcVAaY2xG8wAqx4xG64xvF2IEw4CE5I8CrVC2j2WlYx0E2Ix0cI8IcV AFwI0_JrI_JrylYx0Ex4A2jsIE14v26r1j6r4UMcvjeVCFs4IE7xkEbVWUJVW8JwACjcxG 0xvY0x0EwIxGrwACjI8F5VA0II8E6IAqYI8I648v4I1l42xK82IYc2Ij64vIr41l4I8I3I 0E4IkC6x0Yz7v_Jr0_Gr1lx2IqxVAqx4xG67AKxVWUJVWUGwC20s026x8GjcxK67AKxVWU GVWUWwC2zVAF1VAY17CE14v26r126r1DMIIYrxkI7VAKI48JMIIF0xvE2Ix0cI8IcVAFwI 0_Jr0_JF4lIxAIcVC0I7IYx2IY6xkF7I0E14v26r4j6F4UMIIF0xvE42xK8VAvwI8IcIk0 rVWUJVWUCwCI42IY6I8E87Iv67AKxVWUJVW8JwCI42IY6I8E87Iv6xkF7I0E14v26r4j6r 4UJbIYCTnIWIevJa73UjIFyTuYvjfUFfHUDUUUU X-CM-SenderInfo: p1hex046kxt4xhlfz01xgou0bp/ X-CFilter-Loop: Reflected X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1747084531055222597?= X-GMAIL-MSGID: =?utf-8?q?1747084531055222597?= |
Series |
fix possible memleak in '__blk_trace_remove'
|
|
Commit Message
Ye Bin
Oct. 19, 2022, 3:36 a.m. UTC
From: Ye Bin <yebin10@huawei.com> As previous commit, 'blk_trace_cleanup' will stop block trace if block trace's state is 'Blktrace_running'. So remove unnessary stop block trace in 'blk_trace_shutdown'. Signed-off-by: Ye Bin <yebin10@huawei.com> --- kernel/trace/blktrace.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
Comments
Looks good:
Reviewed-by: Christoph Hellwig <hch@lst.de>
diff --git a/kernel/trace/blktrace.c b/kernel/trace/blktrace.c index e17bba027a2c..a995ea1ef849 100644 --- a/kernel/trace/blktrace.c +++ b/kernel/trace/blktrace.c @@ -776,10 +776,8 @@ int blk_trace_ioctl(struct block_device *bdev, unsigned cmd, char __user *arg) void blk_trace_shutdown(struct request_queue *q) { if (rcu_dereference_protected(q->blk_trace, - lockdep_is_held(&q->debugfs_mutex))) { - __blk_trace_startstop(q, 0); + lockdep_is_held(&q->debugfs_mutex))) __blk_trace_remove(q); - } } #ifdef CONFIG_BLK_CGROUP