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 02161C48BF9 for ; Wed, 15 Nov 2023 14:17:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234971AbjKOORP (ORCPT ); Wed, 15 Nov 2023 09:17:15 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50110 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234172AbjKOORP (ORCPT ); Wed, 15 Nov 2023 09:17:15 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 17A74E7; Wed, 15 Nov 2023 06:17:09 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id DE9D1C433C8; Wed, 15 Nov 2023 14:17:06 +0000 (UTC) Date: Wed, 15 Nov 2023 14:17:04 +0000 From: Catalin Marinas To: Liu Shixin Cc: Geert Uytterhoeven , Patrick Wang , Andrew Morton , Kefeng Wang , linux-mm@kvack.org, linux-kernel@vger.kernel.org, Linux-Renesas Subject: Re: [PATCH 1/2] Revert "mm/kmemleak: move the initialisation of object to __link_object" Message-ID: References: <20231115082138.2649870-1-liushixin2@huawei.com> <20231115082138.2649870-2-liushixin2@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231115082138.2649870-2-liushixin2@huawei.com> Precedence: bulk List-ID: X-Mailing-List: linux-renesas-soc@vger.kernel.org On Wed, Nov 15, 2023 at 04:21:37PM +0800, Liu Shixin wrote: > Move the initialisation of object back to__alloc_object() because > set_track_prepare() attempt to acquire zone->lock(spinlocks) while > __link_object is holding kmemleak_lock(raw_spinlocks). This is not > right for RT mode. > > This reverts commit 245245c2fffd0050772a3f30ba50e2be92537a32. > > Signed-off-by: Liu Shixin You can also add: Fixes: 245245c2fffd ("mm/kmemleak: move the initialisation of object to __link_object") Acked-by: Catalin Marinas I now realised that we update the object allocation stack trace via the delete_object_part() when we shouldn't. I'd say __alloc_object() can take a trace_handle as argument and if it's !0, set it directly whithout calling set_track_prepare() (as a separate patch). -- Catalin