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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3F785C4332F for ; Fri, 21 Oct 2022 03:48:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229661AbiJUDr6 (ORCPT ); Thu, 20 Oct 2022 23:47:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44032 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229682AbiJUDr4 (ORCPT ); Thu, 20 Oct 2022 23:47:56 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5F7461A7A2D for ; Thu, 20 Oct 2022 20:47:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1666324070; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=TykhW5iFncUHDB5XHHRkS75FYjeeJef8QsPki9BMuDs=; b=fUv8YJFFSEjL/8znnG/5EXmD74yXnJmRpUTZ20TcxdftY5hm0/sYBjw/yZM35yrpb8bQOP uhmLuGn4wANNKJiPX27+xrx1byfAvHtjnW2jgmcrrctjSkWTq2fXfDAWC8ZYT4+yNS+6Us SbqIlJ88O9k1eMxd8tLtN9T8WZ6PndM= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-260-YyxZK8a2N0aPY4E5HTOcCA-1; Thu, 20 Oct 2022 23:47:49 -0400 X-MC-Unique: YyxZK8a2N0aPY4E5HTOcCA-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 934C6185A7A8; Fri, 21 Oct 2022 03:47:48 +0000 (UTC) Received: from T590 (ovpn-8-24.pek2.redhat.com [10.72.8.24]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 2275F2166B40; Fri, 21 Oct 2022 03:47:32 +0000 (UTC) Date: Fri, 21 Oct 2022 11:47:24 +0800 From: Ming Lei To: Yu Kuai Cc: hch@lst.de, axboe@kernel.dk, damien.lemoal@wdc.com, linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, yukuai3@huawei.com, yi.zhang@huawei.com Subject: Re: [PATCH -next] block: fix memory leak for elevator on add_disk failure Message-ID: References: <20221021033950.3913764-1-yukuai1@huaweicloud.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20221021033950.3913764-1-yukuai1@huaweicloud.com> X-Scanned-By: MIMEDefang 3.1 on 10.11.54.6 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Oct 21, 2022 at 11:39:50AM +0800, Yu Kuai wrote: > From: Yu Kuai > > The default elevator is allocated in the begining of device_add_disk(), > however, it's not freed in the following error path. > > Fixes: 737eb78e82d5 ("block: Delay default elevator initialization") Originally elevator can be teardown in disk release, or queue release earlier time, so the fixes tag should be: Fixes: 50e34d78815e ("block: disable the elevator int del_gendisk") Thanks, Ming