Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp3895188rdg; Wed, 18 Oct 2023 08:58:11 -0700 (PDT) X-Google-Smtp-Source: AGHT+IF2uj8Abw5jmgolGWslEdTn12IqDmzh0K8XBxrAXwyhAdbd+bGRQ6Mc4cE0mEqFXpKySBcj X-Received: by 2002:a05:6a21:114e:b0:16b:aad0:effe with SMTP id oi14-20020a056a21114e00b0016baad0effemr4381813pzb.62.1697644691149; Wed, 18 Oct 2023 08:58:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697644691; cv=none; d=google.com; s=arc-20160816; b=SSa3ffyP9FCcbyUXUysmrQWwFyHNG0rlIz1WrHm6zw0+taV39q1E+jwiWBWUnJS3Xw U+pIL/IyyRjbFA305yKfHIrzc1d/slIDUnP7C/qeN+revQ3cH3qXlkIjCbMiZntfuCji X7W4ghdqkmvu6MvUum95LB+WxV+qJqnnvz2JNiz24dPk2RjfmTincTfpkfewaJJTeKuX mhg8ljxf/ZazS+xEcEaVfv09ON+hELlOpCSHfBxyoLN6VXIvQWdUr7cInplBvyA1aX7W i6CFlJSlylyOMYEHSeylCgrZ8zEwkcw3bRRuSH4psPeVTtLHzB2QzbPhkTZlXcRS2jnN djrg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=WwU138rdae+tnfMoQAzpt6RHFekywme7JqVZU6mXqOM=; fh=vJuql4DTq6KnxQZ/B563xy3AlrOr/OkDGOAqBtLkTrE=; b=f9oVLpWgHgnpYOxOICKL3RxE093nwz9IQTZrgJLbAQ172evgVWqvDQAP/9U3/2zwOW ITqwMkrihUiORQoR0ZK6A0GySAtcOx5gvEshM0kjVOjSMxbPcg9Gd4noOrNpcQyZ+Es7 K5yPoCtQasRvvytfqhywjZOxqkXp2xFs8hP2Id6Ky2hh0oaYDCLCY940m8nQLfEFzLWg ZMKDhZ4AID2XfWccDYJTyh4RjDtcyIpacItZ3IIpsJY3EIBLtclajrePlju5ZnkrbiHJ DYrhEgmvPRGGjS/tg+x4of/qT4KgOxDEx8ZcsGjc5JYVajQYAbn76wtt73caEiYpVBcl wwVQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from fry.vger.email (fry.vger.email. [2620:137:e000::3:8]) by mx.google.com with ESMTPS id a14-20020a63e40e000000b0058556a636dbsi2423432pgi.434.2023.10.18.08.58.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Oct 2023 08:58:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) client-ip=2620:137:e000::3:8; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id 3AF4D802329E; Wed, 18 Oct 2023 08:58:08 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344875AbjJRP54 (ORCPT + 99 others); Wed, 18 Oct 2023 11:57:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36284 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344849AbjJRP5z (ORCPT ); Wed, 18 Oct 2023 11:57:55 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 128B7118 for ; Wed, 18 Oct 2023 08:57:54 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 79F62C433C7; Wed, 18 Oct 2023 15:57:52 +0000 (UTC) Date: Wed, 18 Oct 2023 16:57:50 +0100 From: Catalin Marinas To: Liu Shixin Cc: Patrick Wang , Andrew Morton , Kefeng Wang , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v3 5/7] mm: kmemleak: use mem_pool_free() to free object Message-ID: References: <20231018102952.3339837-1-liushixin2@huawei.com> <20231018102952.3339837-6-liushixin2@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (fry.vger.email [0.0.0.0]); Wed, 18 Oct 2023 08:58:08 -0700 (PDT) On Wed, Oct 18, 2023 at 04:48:06PM +0100, Catalin Marinas wrote: > On Wed, Oct 18, 2023 at 06:29:50PM +0800, Liu Shixin wrote: > > The kmemleak object is allocated by mem_pool_alloc(), which > > could be from slab or mem_pool[], so it's not suitable using > > __kmem_cache_free() to free the object, use __mem_pool_free() > > instead. > > > > Fixes: 0647398a8c7b ("mm: kmemleak: simple memory allocation pool for kmemleak objects") > > Signed-off-by: Liu Shixin > > Could you please reorder this patch before the previous one? If you > added a Fixes tag, we may want a cc stable as well (as for the other > patches with a Fixes tag) and it makes more sense to backport it on its > own without the __create_object() split. Otherwise: Ah, ignore this. If we want a cc stable, the whole thing needs backporting, including the split which is essential for the subsequent fix. > Reviewed-by: Catalin Marinas -- Catalin