Received: by 2002:a05:7412:b101:b0:e2:908c:2ebd with SMTP id az1csp2624401rdb; Wed, 15 Nov 2023 06:17:29 -0800 (PST) X-Google-Smtp-Source: AGHT+IH9um7OWPqnxRvGbXFTRBEyS9Zodzblia2FPX3QX+m7S/e9mlMZJ31BOguE6GyNTAFVUOnm X-Received: by 2002:a05:6a00:130c:b0:6b6:9f05:6507 with SMTP id j12-20020a056a00130c00b006b69f056507mr10965288pfu.30.1700057849424; Wed, 15 Nov 2023 06:17:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700057849; cv=none; d=google.com; s=arc-20160816; b=XHRQ3bdsIKGOjqxnyWucHP3d1qx3Zi2FKcsvN7EzAqA41T7lmQG96RuRA0MgcUnvDV mJNEaVJfKBtvSnRlon92+EXzsy96RZDvMnUNenQrM8riEP/UjGnXtY3n1vW88H3WLmKX fYDyQv1eFpV38DGsLA1SV5E9r0nYGlROBJu1F2SR7Ttpbi2JO73T8NaItwyahHkL1RGk EEsrYcsVKKudaqldLJ0CdZZ/cL4SuU+fr3ABDgN3aHnt0RKpqBKdXM1BT1UumYf8gFcH nz7pHB2vtT9v6GPi1r3n86p44ma5Vs7aSHy/yeckUTpALEgQpesF10DV3uBuH+tbkrzI a4fA== 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=5sLaSjO/bDXkTZ+Mb6ydElrYL4+3Iqlr9HsXL3Mhicg=; fh=AICnHb0asDYYduy+qxsAsTfKJc2UcRFY4vjRwl271Gk=; b=uEeIzdjpg1I1fwjgJhLxXtPgjzHD3qAjKRq8ON85wYJber4wiBV5XWKauybmuRGByO 0a9DkpwPa4ni+1k39f/7RQEhQqqZuhjrZ40kUoF369BDA2ASqZRNI7VxjcvP/oVDjmYA 50POidSujwkiMoRpXgcjR+AAEKBb81BZPl91EzbX9kDb0BZhxsFUt8vGsXtyIZ+WnNcK fFofUxEc3qxZPU6+pJndsA8IpsMAp8+PjS2v53i9KhvvNN/XjFzbLioUDRfP6PCwmVhg mJeiYL7zL3MdWsl3v1uLiA1MxrVw1LYbiqaHcXPpdlZjmsSckyBO3atEfwozqcI+NHX/ jKTA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 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 groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id j13-20020a056a00174d00b00690d25b1991si10460970pfc.41.2023.11.15.06.17.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 Nov 2023 06:17:29 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 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 groat.vger.email (Postfix) with ESMTP id 1AB1A802B17B; Wed, 15 Nov 2023 06:17:24 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344160AbjKOORQ (ORCPT + 99 others); Wed, 15 Nov 2023 09:17:16 -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> X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.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 (groat.vger.email [0.0.0.0]); Wed, 15 Nov 2023 06:17:24 -0800 (PST) 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