Received: by 2002:a05:6358:51dd:b0:131:369:b2a3 with SMTP id 29csp782075rwl; Thu, 10 Aug 2023 01:11:38 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFBCLLPut6eva5pP8B7kDbSmS0p1+ZGWSJzmpzoFuUllwoGS8J05J6NMERufthXUELtPTYJ X-Received: by 2002:a05:6512:1184:b0:4f4:c6ab:f119 with SMTP id g4-20020a056512118400b004f4c6abf119mr1154453lfr.64.1691655098241; Thu, 10 Aug 2023 01:11:38 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1691655098; cv=pass; d=google.com; s=arc-20160816; b=on5gK9yUqZf+h9saf9r7uuCBg4iDUQpQfLMzyn0vcXF565ZbAJyaAuPdIdgNq6EJDl 2hleUICnxA/6p0HJVCBEjOCdMVg62Jpt67ClWx+XrSVW1qncKRHWJ27vvrjTNEPr/cgY Nc7vYqzPvnjiHnpLlfJ2E57bHGLPCeHi56A1Mp5CLaAggDkVhgoQcjvXU1+i6X2CcGP+ ZTp4LHFwBHSCUGgQ/Jr4ojEX6DFj4Z2HluItRG3BUmMxAXzifQyJjmf4/daep2QStFk0 kxYXB4qho1NMgxblQ9XSblqBu3Q2XnQ2G5Wsd0Go7llSuwTk1dxVQxSd9gX3BzjPmTDx 884w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :message-id:date:subject:cc:to:from:dkim-signature; bh=FG+08jmNx+7kR0mhNAHrfo4GQCX4fVn0beSpS3ZdT3g=; fh=glBGht3B7KMhoGavPouAoC22VMdqX5IG52ihPt7JcDA=; b=HfuRuVl9f7QYfffsT4nKjoO9279rVu7ytv8GxW5WLQQLAUFMXe0ZZgvh6k2xjE5XSb a5u6i+SoZ8yvHfmWaLkkcujN4ruAqAUK8NYjwATCZ4OAr3elLelpSR/IB+8x+GCRuVYu /AjSGB3uula94KQmwdI019OjgEGIhrUt62BSKsR3pVONvWdq1ClEu5Xn4LU3ZSfdc12r 62CLM5LHGQun0fdXpu8tcxmqQOPaWNwmFnIh1R3xA+P4Fj0qVT9S1JiNvPfpB2GM70ij QwG9kvcXYCYDeKV4jKC6HtPqw1ooAn90bHnQnapgZOf45U5tzrL2A4zkvZK0FE1KZzO2 IikQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@windriver.com header.s=PPS06212021 header.b=nRXcMmXR; arc=pass (i=1 spf=pass spfdomain=windriver.com dkim=pass dkdomain=windriver.com dmarc=pass fromdomain=windriver.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=windriver.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d13-20020aa7ce0d000000b005234ce351f3si936747edv.372.2023.08.10.01.11.04; Thu, 10 Aug 2023 01:11:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@windriver.com header.s=PPS06212021 header.b=nRXcMmXR; arc=pass (i=1 spf=pass spfdomain=windriver.com dkim=pass dkdomain=windriver.com dmarc=pass fromdomain=windriver.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=windriver.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233999AbjHJHr7 (ORCPT + 99 others); Thu, 10 Aug 2023 03:47:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50498 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233301AbjHJHrx (ORCPT ); Thu, 10 Aug 2023 03:47:53 -0400 Received: from mx0b-0064b401.pphosted.com (mx0b-0064b401.pphosted.com [205.220.178.238]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F22F9211E for ; Thu, 10 Aug 2023 00:47:51 -0700 (PDT) Received: from pps.filterd (m0250812.ppops.net [127.0.0.1]) by mx0a-0064b401.pphosted.com (8.17.1.22/8.17.1.22) with ESMTP id 37A5f853004421; Thu, 10 Aug 2023 07:47:25 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=windriver.com; h=from:to:cc:subject:date:message-id:content-transfer-encoding :content-type:mime-version; s=PPS06212021; bh=FG+08jmNx+7kR0mhNA Hrfo4GQCX4fVn0beSpS3ZdT3g=; b=nRXcMmXRc5QIlIrAY+14/08tbvWv1bgn+y 3rH+HrHAI2vxYAxegpEnGmF6p1Cra83h2/+skVTZci8rGYcEa125w3ELLZ3hEo5b cDD/fsxs3xPGLHI8rENDOcFJqUfRZVh5ajNlYcqWECbtvfI2zT/brAEszOu9cE2Z oibLBu/NWZHXTg/CRn95RGKe0OWW6DwaSTvNa+9CxggmOAO8jDe6J5Tg1GPU7cpm BT4J/Bq5D+mUn/aRU1iXdkn/kRS7laeyQd77ambYqu1F1+wA04BDvsONazWrA+jB zWeD8LS3j/EmNqLCuE3RXuuysrIqL4OpQaY6MmjZRZIa55f/esnw== Received: from nam04-dm6-obe.outbound.protection.outlook.com (mail-dm6nam04lp2042.outbound.protection.outlook.com [104.47.73.42]) by mx0a-0064b401.pphosted.com (PPS) with ESMTPS id 3s9dd64msm-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 10 Aug 2023 07:47:24 +0000 (GMT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=V7BDVYM7XNxs+iaL33CkXlO37Jx3OrkrYAZx8d0WoOAtuse2nN5DYu+meQnpEFh4vLIUNoSSV2YDGmJOdXjrxK3aFRjOUERXyZt9envnQyOyWG4ixBx0kGgXoUmu+LPQ55FfYtDQ1sbaJBMjl07dIaTijCDthZvNcZvnuiid5Z5MImnplaHWC6D+n3C2exY4QrxqY8a7do4zl+X9qoQ8XpaefXOilnILCTXGjXODg65We3lYNNw0WxXaJCi97+118AKswphHgBk7qI3BAmi9yP3KZswDUIhtHkV4y8TrgQnK8JchHob9IIxCWySl5z8QRh1pBed4Oc9Rl4pNjCZCBA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=FG+08jmNx+7kR0mhNAHrfo4GQCX4fVn0beSpS3ZdT3g=; b=WN6E5mS1crh99Gat4sSnpASzee8K4EpWExAYwXnX1YE00g9Dyaz1L+b38kK6LAc/FCuKcX4Wyump2Ondqdwg6siAnTpI/2eGN5mroSAw5inDYpIgir9Jbw9BRzIX9MAncXn7GXzGi6AXOc11rKzoiyIR/2bEAOWNX+PduLWuolELBClTPNnfpfZTc9AJfHBQ5OpwLjzCarSWWQBsp0/ECuClPAWsONxtdvp7dvWsOHA2LnFWG/nb9fF7D2xIjlKsHgZIT1rAJ1MkbNkIELNl+xW/+wMsZzUGWfK5nMRRWKJIQoz0HI3m+w56c3EKAAWiS2C6VuabNL2jaO/TqkhH2w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=windriver.com; dmarc=pass action=none header.from=windriver.com; dkim=pass header.d=windriver.com; arc=none Received: from SJ0PR11MB5769.namprd11.prod.outlook.com (2603:10b6:a03:420::8) by PH7PR11MB7497.namprd11.prod.outlook.com (2603:10b6:510:270::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6652.30; Thu, 10 Aug 2023 07:47:23 +0000 Received: from SJ0PR11MB5769.namprd11.prod.outlook.com ([fe80::1b5d:f77d:a3c1:ce4c]) by SJ0PR11MB5769.namprd11.prod.outlook.com ([fe80::1b5d:f77d:a3c1:ce4c%4]) with mapi id 15.20.6652.026; Thu, 10 Aug 2023 07:47:22 +0000 From: Xiaolei Wang To: catalin.marinas@arm.com, akpm@linux-foundation.org, glider@google.com, andreyknvl@gmail.com, vbabka@suse.cz, zhaoyang.huang@unisoc.com Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: [PATCH 0/2] Bail out in __stack_depot_save() if the stack_table is not allocated and delete the kmemleak_initialized judgment in set_track_prepare() Date: Thu, 10 Aug 2023 15:47:02 +0800 Message-Id: <20230810074704.2042664-1-xiaolei.wang@windriver.com> X-Mailer: git-send-email 2.25.1 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: SI2PR02CA0006.apcprd02.prod.outlook.com (2603:1096:4:194::8) To SJ0PR11MB5769.namprd11.prod.outlook.com (2603:10b6:a03:420::8) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SJ0PR11MB5769:EE_|PH7PR11MB7497:EE_ X-MS-Office365-Filtering-Correlation-Id: 63048909-807f-4de8-d88a-08db99760828 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: K+WR93My0nuiO+Ug6j3QbvqQbdchHy691M8o64+4tD7H4BSh7fY+f3xNT00pAHYUzTFF0tHg8UAO62i5p2qxx2OQZMdbMnDl92jS2VOb+uT+TadxRVsLWFRC77qoSxsrg/7npk/VuiVj2mImGsJyPG2/FpeAgHPv+iviIwKJADg8wdlJcOU9mXahX4w133rvoobqpJP8AhxI0b2v4K1IDcAuWuFjGrWSsmpE6P6eT8mt8u+6+rVXQ8OJ9pO9KqsEHZ8IMjf/BPnflObChs4SROWUE0bMGU7HqhNDGev6W/0AjZfs8QyANyxeqlVAsR9CXPTDZAJMhUSj+qLplAB1lAAGOTcBTBgrm9duqiD/h0URFKwq3sFqq0t0+BP2EN0I1AVLIO8KToGw/OjPfklxXDCjK3UDAxJiWTRUio4gh+2gFrh6N8EtZj5ufc6eLOQF5qIKxLiVGQUB6a57xa6RjGf9G+0rYVmDAvlztBkxkMb5JU6suuhn7xhajG0xo2M5qWN1sBML5U13PCyT8qyBPUZx/R1d67nGMWlva+Rvrzs9Ug5tj6FuRfXgshAq6iztp3+zKLPSbCHMaIw2+jVFL0xfeAQAMA5HdjQ4cYe1lcDS54CMSgC7Sf2MdTIrRxUu X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SJ0PR11MB5769.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(4636009)(346002)(136003)(376002)(366004)(396003)(39850400004)(186006)(1800799006)(451199021)(2616005)(316002)(86362001)(478600001)(6666004)(6506007)(26005)(1076003)(36756003)(5660300002)(8936002)(8676002)(44832011)(6486002)(41300700001)(6512007)(52116002)(4326008)(2906002)(38350700002)(38100700002)(83380400001)(66476007)(66556008)(66946007)(4744005);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?CuqGlPm8ARtEEKq8x8IbzKVTjPz41NsoM1vW/HqE7s6CH3XS4bTzzwzXdQ9T?= =?us-ascii?Q?sOYdi8gl03jElFyHNBhLL8TRuBTxixgYQvC3kRv2gVI6OaezdDhLl5j2ANC0?= =?us-ascii?Q?wAfR5hAF98sr+iDM7i45AW1qSV7t3fTpTeJfFPa8x0tS16QKkch62LiwL3Qg?= =?us-ascii?Q?HSzeSqkAhhAGCFYfWorJ/fiBnmx/4erX+cegL8Rp+dF4WXsg2XriXS1EHmAL?= =?us-ascii?Q?cj/1SsnetH0fI3yFzVCd0Sba3b9tFb0lI0ara2dJwy+2TJkADhZVYhR5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CUXUI82BBJUnu5UqmuC1xmiRE?= =?us-ascii?Q?Ibfu9sHMR92rmpvCTDYkikMevavFdb4/gU25yWwMU2ucRvNg3nYVYjKtERX2?= =?us-ascii?Q?YFcyhaBnkCZQnZZJ0lyW/cbcRN1cfUJ+jUsFH5L8hs4uttFEWKUCOVI0O81i?= =?us-ascii?Q?zoqS4lWlQ6ivlxyndzqntXUJr5oC1SsJPFiFtmHiYi9tJoexCaY5TBEPO6gu?= =?us-ascii?Q?idplSrZkgsxauFw+jOePOGeCydf+aNMYIejFtGm/BeQtFKLbya5tGtGPIav3?= =?us-ascii?Q?Ghg+qDGk1CAVXaRhKPfh26WC/sMn4+WjBUzJUIE6A7dbVLu5b7No+qJb+IaV?= =?us-ascii?Q?nYkUGBrKXW5DqIJrfxnloXjsivs/MRHwVK3vCMea2OuX1pPmDfVOKNj5jF7P?= =?us-ascii?Q?1GQ2NzhdgF++oQpHMBEGfnUysItDXiQ39oYYBw4IpMXr0orJlHi2Mqnna6RX?= =?us-ascii?Q?Lw=3D=3D?= X-OriginatorOrg: windriver.com X-MS-Exchange-CrossTenant-Network-Message-Id: 63048909-807f-4de8-d88a-08db99760828 X-MS-Exchange-CrossTenant-AuthSource: SJ0PR11MB5769.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Aug 2023 07:47:22.8564 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 8ddb2873-a1ad-4a18-ae4e-4644631433be X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 0k8uRyPHgP2J31GV13Dqm5SgcT37nt6grPT6VT3dWCjhfj1AhM/3QH2UIkN3z9Ni8CujKy+n4flWmXX/4z+8oAoJuur6BokMqVSrtItEFCU= X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR11MB7497 X-Proofpoint-GUID: wvgxzzWmf-7lDOQ78gV0FJ_buBeD0_35 X-Proofpoint-ORIG-GUID: wvgxzzWmf-7lDOQ78gV0FJ_buBeD0_35 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.267,Aquarius:18.0.957,Hydra:6.0.591,FMLib:17.11.176.26 definitions=2023-08-10_07,2023-08-09_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxscore=0 suspectscore=0 mlxlogscore=772 impostorscore=0 lowpriorityscore=0 phishscore=0 spamscore=0 adultscore=0 clxscore=1011 bulkscore=0 malwarescore=0 priorityscore=1501 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2306200000 definitions=main-2308100065 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org patch1 solves the null pointer situation when __stack_depot_save() is called when the stack_table is not initialized. patch2 solved there is no call trace for the memory leak which object is created before the kmemleak_late_init() Xiaolei Wang (2): lib/stackdepot: Bail out in __stack_depot_save() if the stack_table is not allocated mm/kmemleak: No need to check kmemleak_initialized in set_track_prepare() lib/stackdepot.c | 2 +- mm/kmemleak.c | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) -- 2.25.1