From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out-174.mta0.migadu.com (out-174.mta0.migadu.com [91.218.175.174]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A2B7F3FA5EC for ; Wed, 6 May 2026 15:42:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.218.175.174 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778082175; cv=none; b=oCtA+weFMwlcJexO6Uxw290eOovOgO6xzVaHLGTEJ/bs6X3F/YisAVpu88v/DOhP/HQv418WlrQC22RaahTkwdceGROu6KRyuRmHc01KBw/o4i8lkJkyInxPQ7mFVC1aRvX3I/jbbr7cu7bQryOmwSE6QnKUMe/peCq/OxL4/FE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778082175; c=relaxed/simple; bh=kEufrKzV73IGHzs/8qG4gedq55MvISSHOQYp3wxv1ao=; h=Message-ID:Date:MIME-Version:From:To:Cc:Subject:Content-Type; b=AbzL6Ax+kHmM0MKtYNHVg+9BYhE7p8T0CZR0xDAClVZlf3nDqK5JHM+hnoQf6S+f4bGY/jRVT8bPC6hFjOy10hBBMFhKJA7rk7Wb+XV43Yc+S3bDpJCnTK9tmrCD1Ij48YbDUZ8Ek+B5lDd4EbEB48yTM0Sf0fE2alHoHWRgBRg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=kSh8dIPP; arc=none smtp.client-ip=91.218.175.174 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="kSh8dIPP" Message-ID: DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1778082169; h=from:from: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:content-transfer-encoding; bh=+8u7ZeVl4jM3ubfIv7a6q2qcz+9XFAVFIgJhK8Wcji4=; b=kSh8dIPPuOZFcTjB5Rm5KJfMnwa+1I18AUuqRdsZcu7LQIaBnGw+8ZMr04P+PGmmJ2EWQZ z6EK+PiL4kk/n9jcTd+Bp0GCbnIjW8/BPeuIljqVQ3DaB5fSL/1fLPaettRyuYsP+yD5n2 EJBM5jlM4hErxw4my6YJIeh5bKPl0c4= Date: Wed, 6 May 2026 23:42:40 +0800 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Zenghui Yu Content-Language: en-US To: linux-mm@kvack.org, linux-kernel@vger.kernel.org Cc: jgg@ziepe.ca, leon@kernel.org, Andrew Morton , david@kernel.org, ljs@kernel.org, liam@infradead.org, vbabka@kernel.org, rppt@kernel.org, surenb@google.com, mhocko@suse.com Subject: "alloc_tag was not set" when running mm/ksft_hmm.sh Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Migadu-Flow: FLOW_OUT Hi all, Running mm/ksft_hmm.sh triggers the following splat: ------------[ cut here ]------------ alloc_tag was not set WARNING: ./include/linux/alloc_tag.h:164 at ___free_pages+0x2a0/0x2d0, CPU#5: hmm-tests/2020 Modules linked in: test_hmm rfkill drm backlight fuse CPU: 5 UID: 0 PID: 2020 Comm: hmm-tests Kdump: loaded Not tainted 7.1.0-rc2-00099-gadc1e5c6203c-dirty #285 PREEMPT Hardware name: QEMU QEMU Virtual Machine, BIOS edk2-stable202408-prebuilt.qemu.org 08/13/2024 pstate: 61400005 (nZCv daif +PAN -UAO -TCO +DIT -SSBS BTYPE=--) pc : ___free_pages+0x2a0/0x2d0 lr : ___free_pages+0x2a0/0x2d0 sp : ffff80008345b530 x29: ffff80008345b530 x28: ffff80008345b700 x27: ffffffffbfff8040 x26: ffff0000c41cb360 x25: ffff0000c0c64008 x24: ffff800081aae400 x23: 05ffff0000000200 x22: 0000000000000000 x21: 0000000000000000 x20: fffffdffc5f20040 x19: 0000000000000000 x18: fffffffffffe7c78 x17: 0000000000000000 x16: 0000000000000000 x15: fffffffffffe7c98 x14: 00000000000001d1 x13: ffff8000818f3d58 x12: 0000000000000573 x11: fffffffffffe7c98 x10: ffff80008194bd58 x9 : 3ffffffffffff000 x8 : ffff8000818f3d58 x7 : ffff80008194bd58 x6 : 0000000000000000 x5 : ffff0001fedb1088 x4 : 0000000000000001 x3 : 0000000000000000 x2 : 0000000000000000 x1 : 0000000000000000 x0 : ffff0000c7f58000 Call trace: ___free_pages+0x2a0/0x2d0 (P) __free_pages+0x14/0x20 dmirror_devmem_free+0x13c/0x158 [test_hmm] free_zone_device_folio+0x144/0x1e4 __folio_put+0x124/0x130 free_folio_and_swap_cache+0xa8/0xcc __folio_split+0x664/0x7fc split_folio_to_list+0x50/0x5c migrate_vma_split_folio+0x13c/0x25c migrate_vma_collect_pmd+0xed4/0xf68 walk_pgd_range+0x598/0x9a0 __walk_page_range+0x90/0x1a0 walk_page_range_mm_unsafe+0x194/0x20c walk_page_range+0x20/0x2c migrate_vma_setup+0x18c/0x224 dmirror_devmem_fault+0x188/0x2b8 [test_hmm] do_swap_page+0x1458/0x185c __handle_mm_fault+0x85c/0x1ba0 handle_mm_fault+0xb0/0x290 do_page_fault+0x1f8/0x6f8 do_translation_fault+0x60/0x6c do_mem_abort+0x44/0x94 el0_da+0x30/0xdc el0t_64_sync_handler+0xd0/0xe4 el0t_64_sync+0x198/0x19c ---[ end trace 0000000000000000 ]--- lib/test_hmm.c:705 module test_hmm func:dmirror_devmem_alloc_page has 16744448 allocated at module unload It was tested on kernel built with arm64's virt.config and +CONFIG_ZONE_DEVICE=y +CONFIG_DEVICE_PRIVATE=y +CONFIG_TEST_HMM=m +CONFIG_MEM_ALLOC_PROFILING=y +CONFIG_MEM_ALLOC_PROFILING_DEBUG=y Thanks, Zenghui