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 AB2BFC25B67 for ; Tue, 24 Oct 2023 01:33:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231827AbjJXBdr (ORCPT ); Mon, 23 Oct 2023 21:33:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40608 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230284AbjJXBdp (ORCPT ); Mon, 23 Oct 2023 21:33:45 -0400 Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CF800139 for ; Mon, 23 Oct 2023 18:33:42 -0700 (PDT) Received: from dggpemm500009.china.huawei.com (unknown [172.30.72.56]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4SDvcL0h62zNnv2; Tue, 24 Oct 2023 09:29:38 +0800 (CST) Received: from [10.174.179.24] (10.174.179.24) by dggpemm500009.china.huawei.com (7.185.36.225) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.31; Tue, 24 Oct 2023 09:33:39 +0800 Subject: Re: [PATCH -next] mm/kmemleak: move the initialisation of object to __link_object To: Andrew Morton References: <20231023025125.90972-1-liushixin2@huawei.com> <20231023111624.15ea508ed8aba2dee69035c2@linux-foundation.org> CC: Catalin Marinas , Patrick Wang , Kefeng Wang , , From: Liu Shixin Message-ID: <0f977cdb-039d-789b-802f-02746f5ad8ea@huawei.com> Date: Tue, 24 Oct 2023 09:33:38 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.7.1 MIME-Version: 1.0 In-Reply-To: <20231023111624.15ea508ed8aba2dee69035c2@linux-foundation.org> Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 8bit X-Originating-IP: [10.174.179.24] X-ClientProxiedBy: dggems701-chm.china.huawei.com (10.3.19.178) To dggpemm500009.china.huawei.com (7.185.36.225) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2023/10/24 2:16, Andrew Morton wrote: > On Mon, 23 Oct 2023 10:51:25 +0800 Liu Shixin wrote: > >> Leave __alloc_object() just do the actual allocation and __link_object() >> do the full initialisation. > Changelog doesn't describe why we're making this change? > . In patch (“mm: kmemleak: split __create_object into two functions”), the initialisation of object has been splited in two places. Catalin said it feels a bit weird and error prone. So leave __alloc_object() just do the actual allocation and __link_object() do the full initialisation. thanks, >