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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6F6F0CA0EE6 for ; Fri, 30 Aug 2024 07:15:19 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id EE2D36B00CC; Fri, 30 Aug 2024 03:15:18 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id E91DD6B00CD; Fri, 30 Aug 2024 03:15:18 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id D331E6B00CE; Fri, 30 Aug 2024 03:15:18 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id B3C0F6B00CC for ; Fri, 30 Aug 2024 03:15:18 -0400 (EDT) Received: from smtpin12.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id 20CB2141542 for ; Fri, 30 Aug 2024 07:15:17 +0000 (UTC) X-FDA: 82508050674.12.F0E48A7 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.9]) by imf14.hostedemail.com (Postfix) with ESMTP id 662A010000B for ; Fri, 30 Aug 2024 07:15:14 +0000 (UTC) Authentication-Results: imf14.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b=HIroqDNi; spf=pass (imf14.hostedemail.com: domain of ying.huang@intel.com designates 198.175.65.9 as permitted sender) smtp.mailfrom=ying.huang@intel.com; dmarc=pass (policy=none) header.from=intel.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1725002024; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=80BQMDPBBYkwRJaHXmgSQvNjwMv6Ywj0hTQiO1+KQkg=; b=tHv0RrA5MAWa6OTqQDGhVbxtTqQFu+9kx0FMKsGDcpI5b9X9NGaIKmC6D8d+S3i6/Gr2PB upiJ6H37pJOFbQCy/3QAP1bnmu7VWbhYgLWO+m2wiQELXIEpNuv5rkwN+9tmKrFZhRS9P5 yo05Iyj08dYDsL3PqnDkruLo/6wMbkQ= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1725002024; a=rsa-sha256; cv=none; b=BwT4DaPPOi/YUsbleV4JknmsbvZwbFjLhPhJfF/bZpBI/CAR+vkzjxAwkdJ158jtpKm/iE k+pu1dTQyGo0yda4UbjF6XhO+No/LgVkkSlsNeZYmpGHOdDNOQh66BEUnS2nB7tqDX6fWi WRbmUvqmixKIfAomfUhRm1TthRecrnc= ARC-Authentication-Results: i=1; imf14.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b=HIroqDNi; spf=pass (imf14.hostedemail.com: domain of ying.huang@intel.com designates 198.175.65.9 as permitted sender) smtp.mailfrom=ying.huang@intel.com; dmarc=pass (policy=none) header.from=intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1725002115; x=1756538115; h=from:to:cc:subject:in-reply-to:references:date: message-id:mime-version; bh=5GEbyaxw7dZyfrWDz9Qbp14laIxFNB02LOyeS9zAY5Q=; b=HIroqDNis8MCkRxPvvKZUoF5AxJIehjxeu9N+g46FE8mpLjKEkIE02wb EpRZIjQP2nBUxYOtLj7rb0LlPvvSwrpPps2IHGWff7nrd/5Lu1dywc5f0 HtJP/KFDv5yVfTwGVUQ26SnY19gjB1dNhkNR/veUMDVO3yNKlZXCaw+rV pB1jf+rWKIcfUrweYEZlY4hvO9f6cK4F+w5ADcUh5hP6Tq380LbehiOPl 2e9pbGlkJUUd4zvs62o9dp+XiVkd4r6IO9OKoFTsv3Ejc9TRGyoS+bjjN yMcvdLV11VxG4z2S4uNfMGyvytwOocnMgAU9Z7REuU0zvKZ8MDlzcY+tD Q==; X-CSE-ConnectionGUID: 4pVcKk2TSPSgu0gfwpF6yg== X-CSE-MsgGUID: QDGwW3zHSryR6e3VuwJBNg== X-IronPort-AV: E=McAfee;i="6700,10204,11179"; a="46141977" X-IronPort-AV: E=Sophos;i="6.10,188,1719903600"; d="scan'208";a="46141977" Received: from fmviesa007.fm.intel.com ([10.60.135.147]) by orvoesa101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Aug 2024 00:15:13 -0700 X-CSE-ConnectionGUID: xA0uTBLRS2yN7cPxmMfTbw== X-CSE-MsgGUID: HvDFfnlYSJuS1tUuhX961Q== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.10,188,1719903600"; d="scan'208";a="63506586" Received: from yhuang6-desk2.sh.intel.com (HELO yhuang6-desk2.ccr.corp.intel.com) ([10.238.208.55]) by fmviesa007-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Aug 2024 00:15:11 -0700 From: "Huang, Ying" To: Yanfei Xu Cc: , , , Subject: Re: [PATCH] memory tier: fix deadlock warning while onlining pages In-Reply-To: <20240827113614.1343049-1-yanfei.xu@intel.com> (Yanfei Xu's message of "Tue, 27 Aug 2024 19:36:14 +0800") References: <20240827113614.1343049-1-yanfei.xu@intel.com> Date: Fri, 30 Aug 2024 15:11:38 +0800 Message-ID: <87ed66h4d1.fsf@yhuang6-desk2.ccr.corp.intel.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=ascii X-Stat-Signature: cdy49mtohssnw19omosx76n6uwtorkcd X-Rspamd-Queue-Id: 662A010000B X-Rspam-User: X-Rspamd-Server: rspam08 X-HE-Tag: 1725002114-173420 X-HE-Meta: U2FsdGVkX1/ZdMXqmT26schDM/VSTlsHMFkJrLMSOJuWjPQFf1uvytkvsBtg/BqWAwImf3F4l7LkCtJG1s6J0xGK9QNrefTyQDSJxF9mx9/JykiwBNPD7nYKcGsrOOEHGwX5fGa8IDmLFPWsUBXZVeougrJjV7KMeb5CBEiE7uka70ePIolN+nvI52QnQYtfwmiPlaiC8Udrgl83TiZZcQwDPjoPTqzViyCTiIr8hQGMgWnkjlLYVjPt4XQwaLmhgMlpEvMKbeZ9Aeo1c0LflWQij8pZkPA+0jxfyo40EF+rQS40HU7FjCzNZUwH8HagP2mtOLmUx2+3v8yXNtnFKq81WTVQ/Xh62gm6mp1NGY9sWx6t9ijHqBokPILc/fVGA8aJUYeShyC5fkuQ6bB9fb4aghl7oUX8qOd2dQ2Dg7GeJtjehLOSZTjB6doUj2Cvxm16DNCK8Z0Zz6Kci5C6Lm6i3AnWANTvgV4q43FSY+Ta52S1YqlRcrFa15ZU2ftTK3FVgWgzMrfq/Wqr4WsFguKeJWyE9t+dL2bx6hVdIHo34wuK2U6rqYF7szMhFiRcDEIg7eb1SyjSEL02sD8T3/7iNW8bvMctB8VmWkJkoHx/z4xkwf60Hrv+4YBtl3yPzp5vCrjA0xDLgf7N/HzSzI3W4i1ELszDfPuoSMYwCymOwKEictKRUvP00IG8UdKI/xxmfu+kx93njWn8Mf2jDlBLNWdLJEdExCsqljuPrjw7GOUeZdiFCebNXL/ekG4gjadz2wEiPfxErPXGUjVvoTxGDdpuCBz+RUU1gJbgQzcxIIWEeo900Id7UHf01Ec7d/j0PVyhxrnfCaazT6oKYaWtbLM1PViT2c3osPelfOugFgpSLuVJVeDnCguktvqKqa82bX5nsr/ZTKX6MZ6rAtmTxRnMspdIUwocmeMnq8F9CwIHGbTpuY+VcuJzgeYlSZDG4oqeiZX/Fp9vR+4 WNEKW6Dq 6WclqF47tjqD/5ZdbTkBcVr+ZmYvQKkiFc2BwUOPYdsPJVA5VNiY8FmyHv3g0Rxr2UQpnsJMJgmCDx2ow37WqXtxzlRcIYSFKK2AEx5P+Tx7gRAlfAlZlPHRhJ8cAGUIfNi9IRuAjVhKeJm1kxJ0QjmWXox5l8fg9M+3uK2LMCmy+SPLDtcRbw/a/PdSKtv4YTxBH X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: Hi, Yanfei, Yanfei Xu writes: > The memory_tier_init() acquires unnecessary memory_tier_lock and > its locking scope includes the memory notifier registration of > hotplug callback, which also acqures the memory_tier_lock. This can > trigger an locking dependency detected of ABBA deadlock. > > Specifically, If the memory online event occurs, the executing > memory notifier will access the read lock of the memory_chain.rwsem, > then the reigistration of the memory notifier in memory_tier_init() > acquires the write lock of the memory_chain.rwsem while holding > memory_tier_lock. Then the memory online event continues to invoke > the memory hotplug callback registered by memory_tier_init(). Since > this callback tries to acquire the memory_tier_lock, a deadlock > occurs. Thank you very much to fix this! > In fact, this deadlock can't happen because the memory_tier_init() > always executes before memory online events happen due to the > subsys_initcall() has an higher priority than module_init(). > > [ 133.491106] WARNING: possible circular locking dependency detected > [ 133.493656] 6.11.0-rc2+ #146 Tainted: G O N > [ 133.504290] ------------------------------------------------------ > [ 133.515194] (udev-worker)/1133 is trying to acquire lock: > [ 133.525715] ffffffff87044e28 (memory_tier_lock){+.+.}-{3:3}, at: memtier_hotplug_callback+0x383/0x4b0 > [ 133.536449] > [ 133.536449] but task is already holding lock: > [ 133.549847] ffffffff875d3310 ((memory_chain).rwsem){++++}-{3:3}, at: blocking_notifier_call_chain+0x60/0xb0 > [ 133.556781] > [ 133.556781] which lock already depends on the new lock. > [ 133.556781] > [ 133.569957] > [ 133.569957] the existing dependency chain (in reverse order) is: > [ 133.577618] > [ 133.577618] -> #1 ((memory_chain).rwsem){++++}-{3:3}: > [ 133.584997] down_write+0x97/0x210 > [ 133.588647] blocking_notifier_chain_register+0x71/0xd0 > [ 133.592537] register_memory_notifier+0x26/0x30 > [ 133.596314] memory_tier_init+0x187/0x300 > [ 133.599864] do_one_initcall+0x117/0x5d0 > [ 133.603399] kernel_init_freeable+0xab0/0xeb0 > [ 133.606986] kernel_init+0x28/0x2f0 > [ 133.610312] ret_from_fork+0x59/0x90 > [ 133.613652] ret_from_fork_asm+0x1a/0x30 > [ 133.617012] > [ 133.617012] -> #0 (memory_tier_lock){+.+.}-{3:3}: > [ 133.623390] __lock_acquire+0x2efd/0x5c60 > [ 133.626730] lock_acquire+0x1ce/0x580 > [ 133.629757] __mutex_lock+0x15c/0x1490 > [ 133.632731] mutex_lock_nested+0x1f/0x30 > [ 133.635717] memtier_hotplug_callback+0x383/0x4b0 > [ 133.638748] notifier_call_chain+0xbf/0x370 > [ 133.641647] blocking_notifier_call_chain+0x76/0xb0 > [ 133.644636] memory_notify+0x2e/0x40 > [ 133.647427] online_pages+0x597/0x720 > [ 133.650246] memory_subsys_online+0x4f6/0x7f0 > [ 133.653107] device_online+0x141/0x1d0 > [ 133.655831] online_memory_block+0x4d/0x60 > [ 133.658616] walk_memory_blocks+0xc0/0x120 > [ 133.661419] add_memory_resource+0x51d/0x6c0 > [ 133.664202] add_memory_driver_managed+0xf5/0x180 > [ 133.667060] dev_dax_kmem_probe+0x7f7/0xb40 [kmem] > [ 133.669949] dax_bus_probe+0x147/0x230 > [ 133.672687] really_probe+0x27f/0xac0 > [ 133.675463] __driver_probe_device+0x1f3/0x460 > [ 133.678493] driver_probe_device+0x56/0x1b0 > [ 133.681366] __driver_attach+0x277/0x570 > [ 133.684149] bus_for_each_dev+0x145/0x1e0 > [ 133.686937] driver_attach+0x49/0x60 > [ 133.689673] bus_add_driver+0x2f3/0x6b0 > [ 133.692421] driver_register+0x170/0x4b0 > [ 133.695118] __dax_driver_register+0x141/0x1b0 > [ 133.697910] dax_kmem_init+0x54/0xff0 [kmem] > [ 133.700794] do_one_initcall+0x117/0x5d0 > [ 133.703455] do_init_module+0x277/0x750 > [ 133.706054] load_module+0x5d1d/0x74f0 > [ 133.708602] init_module_from_file+0x12c/0x1a0 > [ 133.711234] idempotent_init_module+0x3f1/0x690 > [ 133.713937] __x64_sys_finit_module+0x10e/0x1a0 > [ 133.716492] x64_sys_call+0x184d/0x20d0 > [ 133.719053] do_syscall_64+0x6d/0x140 > [ 133.721537] entry_SYSCALL_64_after_hwframe+0x76/0x7e > [ 133.724239] > [ 133.724239] other info that might help us debug this: > [ 133.724239] > [ 133.730832] Possible unsafe locking scenario: > [ 133.730832] > [ 133.735298] CPU0 CPU1 > [ 133.737759] ---- ---- > [ 133.740165] rlock((memory_chain).rwsem); > [ 133.742623] lock(memory_tier_lock); > [ 133.745357] lock((memory_chain).rwsem); > [ 133.748141] lock(memory_tier_lock); > [ 133.750489] > [ 133.750489] *** DEADLOCK *** > [ 133.750489] > [ 133.756742] 6 locks held by (udev-worker)/1133: > [ 133.759179] #0: ffff888207be6158 (&dev->mutex){....}-{3:3}, at: __driver_attach+0x26c/0x570 > [ 133.762299] #1: ffffffff875b5868 (device_hotplug_lock){+.+.}-{3:3}, at: lock_device_hotplug+0x20/0x30 > [ 133.765565] #2: ffff88820cf6a108 (&dev->mutex){....}-{3:3}, at: device_online+0x2f/0x1d0 > [ 133.768978] #3: ffffffff86d08ff0 (cpu_hotplug_lock){++++}-{0:0}, at: mem_hotplug_begin+0x17/0x30 > [ 133.772312] #4: ffffffff8702dfb0 (mem_hotplug_lock){++++}-{0:0}, at: mem_hotplug_begin+0x23/0x30 > [ 133.775544] #5: ffffffff875d3310 ((memory_chain).rwsem){++++}-{3:3}, at: blocking_notifier_call_chain+0x60/0xb0 > [ 133.779113] > [ 133.779113] stack backtrace: > [ 133.783728] CPU: 5 UID: 0 PID: 1133 Comm: (udev-worker) Tainted: G O N 6.11.0-rc2+ #146 > [ 133.787220] Tainted: [O]=OOT_MODULE, [N]=TEST > [ 133.789948] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 0.0.0 02/06/2015 > [ 133.793291] Call Trace: > [ 133.795826] > [ 133.798284] dump_stack_lvl+0xea/0x150 > [ 133.801025] dump_stack+0x19/0x20 > [ 133.803609] print_circular_bug+0x477/0x740 > [ 133.806341] check_noncircular+0x2f4/0x3e0 > [ 133.809056] ? __pfx_check_noncircular+0x10/0x10 > [ 133.811866] ? __pfx_lockdep_lock+0x10/0x10 > [ 133.814670] ? __sanitizer_cov_trace_const_cmp8+0x1c/0x30 > [ 133.817610] __lock_acquire+0x2efd/0x5c60 > [ 133.820339] ? __pfx___lock_acquire+0x10/0x10 > [ 133.823128] ? __dax_driver_register+0x141/0x1b0 > [ 133.825926] ? do_one_initcall+0x117/0x5d0 > [ 133.828648] lock_acquire+0x1ce/0x580 > [ 133.831349] ? memtier_hotplug_callback+0x383/0x4b0 > [ 133.834293] ? __pfx_lock_acquire+0x10/0x10 > [ 133.837134] __mutex_lock+0x15c/0x1490 > [ 133.839829] ? memtier_hotplug_callback+0x383/0x4b0 > [ 133.842753] ? memtier_hotplug_callback+0x383/0x4b0 > [ 133.845602] ? __this_cpu_preempt_check+0x21/0x30 > [ 133.848438] ? __pfx___mutex_lock+0x10/0x10 > [ 133.851200] ? __pfx_lock_acquire+0x10/0x10 > [ 133.853935] ? global_dirty_limits+0xc0/0x160 > [ 133.856699] ? __sanitizer_cov_trace_switch+0x58/0xa0 > [ 133.859564] mutex_lock_nested+0x1f/0x30 > [ 133.862251] ? mutex_lock_nested+0x1f/0x30 > [ 133.864964] memtier_hotplug_callback+0x383/0x4b0 > [ 133.867752] notifier_call_chain+0xbf/0x370 > [ 133.870550] ? writeback_set_ratelimit+0xe8/0x160 > [ 133.873372] blocking_notifier_call_chain+0x76/0xb0 > [ 133.876311] memory_notify+0x2e/0x40 > [ 133.879013] online_pages+0x597/0x720 > [ 133.881686] ? irqentry_exit+0x3e/0xa0 > [ 133.884397] ? __pfx_online_pages+0x10/0x10 > [ 133.887244] ? __sanitizer_cov_trace_const_cmp8+0x1c/0x30 > [ 133.890299] ? mhp_init_memmap_on_memory+0x7a/0x1c0 > [ 133.893203] memory_subsys_online+0x4f6/0x7f0 > [ 133.896099] ? __pfx_memory_subsys_online+0x10/0x10 > [ 133.899039] ? xa_load+0x16d/0x2e0 > [ 133.901667] ? __pfx_xa_load+0x10/0x10 > [ 133.904366] ? __pfx_memory_subsys_online+0x10/0x10 > [ 133.907218] device_online+0x141/0x1d0 > [ 133.909845] online_memory_block+0x4d/0x60 > [ 133.912494] walk_memory_blocks+0xc0/0x120 > [ 133.915104] ? __pfx_online_memory_block+0x10/0x10 > [ 133.917776] add_memory_resource+0x51d/0x6c0 > [ 133.920404] ? __pfx_add_memory_resource+0x10/0x10 > [ 133.923104] ? _raw_write_unlock+0x31/0x60 > [ 133.925781] ? register_memory_resource+0x119/0x180 > [ 133.928450] add_memory_driver_managed+0xf5/0x180 > [ 133.931036] dev_dax_kmem_probe+0x7f7/0xb40 [kmem] > [ 133.933665] ? __pfx_dev_dax_kmem_probe+0x10/0x10 [kmem] > [ 133.936332] ? __pfx___up_read+0x10/0x10 > [ 133.938878] dax_bus_probe+0x147/0x230 > [ 133.941332] ? __pfx_dax_bus_probe+0x10/0x10 > [ 133.943954] really_probe+0x27f/0xac0 > [ 133.946387] ? __sanitizer_cov_trace_const_cmp1+0x1e/0x30 > [ 133.949106] __driver_probe_device+0x1f3/0x460 > [ 133.951704] ? parse_option_str+0x149/0x190 > [ 133.954241] driver_probe_device+0x56/0x1b0 > [ 133.956749] __driver_attach+0x277/0x570 > [ 133.959228] ? __pfx___driver_attach+0x10/0x10 > [ 133.961776] bus_for_each_dev+0x145/0x1e0 > [ 133.964367] ? __pfx_bus_for_each_dev+0x10/0x10 > [ 133.967019] ? __kasan_check_read+0x15/0x20 > [ 133.969543] ? _raw_spin_unlock+0x31/0x60 > [ 133.972132] driver_attach+0x49/0x60 > [ 133.974536] bus_add_driver+0x2f3/0x6b0 > [ 133.977044] driver_register+0x170/0x4b0 > [ 133.979480] __dax_driver_register+0x141/0x1b0 > [ 133.982126] ? __pfx_dax_kmem_init+0x10/0x10 [kmem] > [ 133.984724] dax_kmem_init+0x54/0xff0 [kmem] > [ 133.987284] ? __pfx_dax_kmem_init+0x10/0x10 [kmem] > [ 133.989965] do_one_initcall+0x117/0x5d0 > [ 133.992506] ? __pfx_do_one_initcall+0x10/0x10 > [ 133.995185] ? __kasan_kmalloc+0x88/0xa0 > [ 133.997748] ? kasan_poison+0x3e/0x60 > [ 134.000288] ? kasan_unpoison+0x2c/0x60 > [ 134.002762] ? kasan_poison+0x3e/0x60 > [ 134.005202] ? __asan_register_globals+0x62/0x80 > [ 134.007753] ? __pfx_dax_kmem_init+0x10/0x10 [kmem] > [ 134.010439] do_init_module+0x277/0x750 > [ 134.012953] load_module+0x5d1d/0x74f0 > [ 134.015406] ? __pfx_load_module+0x10/0x10 > [ 134.017887] ? __pfx_ima_post_read_file+0x10/0x10 > [ 134.020470] ? __sanitizer_cov_trace_const_cmp8+0x1c/0x30 > [ 134.023127] ? __sanitizer_cov_trace_const_cmp4+0x1a/0x20 > [ 134.025767] ? security_kernel_post_read_file+0xa2/0xd0 > [ 134.028429] ? __sanitizer_cov_trace_const_cmp4+0x1a/0x20 > [ 134.031162] ? kernel_read_file+0x503/0x820 > [ 134.033645] ? __pfx_kernel_read_file+0x10/0x10 > [ 134.036232] ? __pfx___lock_acquire+0x10/0x10 > [ 134.038766] init_module_from_file+0x12c/0x1a0 > [ 134.041291] ? init_module_from_file+0x12c/0x1a0 > [ 134.043936] ? __pfx_init_module_from_file+0x10/0x10 > [ 134.046516] ? __this_cpu_preempt_check+0x21/0x30 > [ 134.049091] ? __kasan_check_read+0x15/0x20 > [ 134.051551] ? do_raw_spin_unlock+0x60/0x210 > [ 134.054077] idempotent_init_module+0x3f1/0x690 > [ 134.056643] ? __pfx_idempotent_init_module+0x10/0x10 > [ 134.059318] ? __sanitizer_cov_trace_const_cmp4+0x1a/0x20 > [ 134.061995] ? __fget_light+0x17d/0x210 > [ 134.064428] __x64_sys_finit_module+0x10e/0x1a0 > [ 134.066976] x64_sys_call+0x184d/0x20d0 > [ 134.069405] do_syscall_64+0x6d/0x140 > [ 134.071926] entry_SYSCALL_64_after_hwframe+0x76/0x7e > > Fixes: 823430c8e9d9 ("memory tier: consolidate the initialization of memory tiers") > Signed-off-by: Yanfei Xu > --- > mm/memory-tiers.c | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/mm/memory-tiers.c b/mm/memory-tiers.c > index 4775b3a3dabe..dddcd6b38e28 100644 > --- a/mm/memory-tiers.c > +++ b/mm/memory-tiers.c > @@ -895,7 +895,6 @@ static int __init memory_tier_init(void) > WARN_ON(!node_demotion); > #endif > > - guard(mutex)(&memory_tier_lock); > /* > * For now we can have 4 faster memory tiers with smaller adistance > * than default DRAM tier. Although it's not absolutely necessary, I still think that it's better to just revert the locking change of memory_tier_init() in commit 823430c8e9d9 ("memory tier: consolidate the initialization of memory tiers"). That is, to use mutex_lock/unlock() and exclude hotplug_memory_notifier() from the locked region. Because we will always hold memory_tier_lock when working on memory tier related data structures in this way. -- Best Regards, Huang, Ying