From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=74.125.82.197 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796349395; b=ePWXHupCcU1z4dZ1YyN1CuJj1XZt+PnOYB+lAVB96onT3oWU5mJ/H7mxDWzFjyiz3uAS xNP2pOfFspsaDYqJwlRtxZqRci6rYJV09EXxhrvP957hJC+H4IRhwEV5UnYCFEsNRFTmG Z5iE043zShHKA4LY1m6I0EkdfgQS4YSTZsn2aoRCBiFRL1DAd2KQ1FlAAbeqxSiWTU1Se DqWqoNAlDvBcWxbVfHWiFvGI02fhVjY79iMcu/3cLdiZRGKlEUVPXAKhP6DXGaxvbyRJL dd0c9EBmb6GRXrAKsBpSb/9z+tVk7BgLm07tWhX4FjWHuOT/51QKNDxsQtg0b5CyUkA== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796349395; h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature: X-Forwarded-Encrypted:X-Gm-Message-State:X-Received:Date:Mime-Version: X-Mailer:Message-ID:Subject:From:To:Cc:Content-Type; bh=MBMJJjKR9vUuzSuub2i0MLlZ53xWz+cVIVQ3tFOXM2c=; b=U+dVL61qSUI3x/mRebHFzfIi+AWJNIbhh1mXq6Z5FfYFLPpQpumPNMQhRh0IAjznXiHu NTleO24iMX3lMVe1sd0T+NitcWUxp69ynyPVm5V/s/bDGXMZ4g9POOFKItsMDUCkLcWYJ bJFcvCZgZir1ABLuvU8xouaNnyxi8RnBIVJNI/fJj9so67ul+0gDYeMP2r9cJMbF3bqsT LhLwdi2EsCaQ21NjFLdEJjR2cOAgEWM4AWRnHAf0FmooxFqjNVuaTMJYJWm5tT+zloA1+ ufEy0JK5bQtHLGLDzJCX9+Z4kAffJD3ECIobWefFSnXzQFug87hV26v/Blt2VrinYQw== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=google.com; spf=pass smtp.mailfrom=flex--surenb.bounces.google.com; dkim=pass header.d=google.com header.i=@google.com header.a=rsa-sha256 header.s=20260707 header.b=FjFp5Fi6; arc=none smtp.remote-ip=74.125.82.197 Received: from mail-dy1-f197.google.com (mail-dy1-f197.google.com [74.125.82.197]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3E3AE606A32C for ; Fri, 4 Dec 2026 01:56:35 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 3E3AE606A32C Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--surenb.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.a=rsa-sha256 header.s=20260707 header.b=FjFp5Fi6 Received: by mail-dy1-f197.google.com with SMTP id 5a478bee46e88-38751f8cc15so788507eec.1 for ; Thu, 03 Dec 2026 17:56:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20260707; t=1796349394; x=1796954194; darn=lists.linux.dev; h=content-type:cc:to:from:subject:message-id:mime-version:date:from :to:cc:subject:date:message-id:reply-to:content-type; bh=MBMJJjKR9vUuzSuub2i0MLlZ53xWz+cVIVQ3tFOXM2c=; b=FjFp5Fi6UiIh32jvUIqHPPJl58CJDCMX5BX28kya8vQZna5YCKN0bHh2k1fhYBpaij 8bY/l7WRWmrWwxRegZq8RmYRotKsKW0EqdBqP9n1ZEPj62mu/sqFB+m9DTO1QaiXHc9k u1uj2laKLvqHAQ3LmKbaDK1ngeB+9F726FNP8p90tuwx0YFi3yK6qyWEnwz20gC1zzSe tWDsG2V3g1huT6L6uDNF29hG5rVNef8EwVhbJ0vb55lagd/mEBEXirjJkn/dtVYl3xYW QtNXWI5+W4r1oKxc0Wi/eOp0f49ykjJotyiD0eZ+hQMcHzHl7fOIyFrOMxyx1jGcOTfO 3ZhA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796349394; x=1796954194; h=content-type:cc:to:from:subject:message-id:mime-version:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=MBMJJjKR9vUuzSuub2i0MLlZ53xWz+cVIVQ3tFOXM2c=; b=kG4RNc6MiEMNyCLO/lwLJH4kh/H9mJUW5C8ajPhfzQCRlUD0CGngDWI5BO3gYOS4ZM wh+wuHCAmFKX+sDQPCFJy7lvaFz3Ra7/GWHPViosS0HIYSXxMqDB1hP4T8tt2No15qWF 8zBsOmYTtcNnkbd2VOOly/uyA9Ymc3wUrNwOR4dcIPq/ZPB8zUSHC3J7LQ1yW9kKAB5I 8w+bSjDdshyYyrjSYLvIZ6sdNfVob6Vy0aFO3EwNPY/taANFVrn8Fo5iuiIFoKR8K+rb 0+/FEV9a+sidYAOOqIo2iLobL13Uyh3py9F4GAWUwFD20GS8FOzzotldw7BC7Wx1MapK 7wBg== X-Forwarded-Encrypted: i=1; AL+hErGmTwwzAM9X1c4rFGtlZSUc3uCyy8u3J0VZi2iaSwfA+bgEZxK71FLcvwrRM+gKt1i+s0wTVDCsQuToKs1Udw==@lists.linux.dev X-Gm-Message-State: APuU4Z9/eyUZwY8MTm02risPSxHtnDa1QAO+wUU6Ovl3rMgnSUKtY4wK wNxZ0kUq6RXqQHCCtV988fextsFKpNtVhOwS2motw0h3VIr35LuKhn4+l44lxxZXbMR3EAkkVbY ILfsr8Q== X-Received: from dycmb2-n2.prod.google.com ([2002:a05:693c:20c2:20b0:373:6c70:7c9c]) (user=surenb job=prod-delivery.src-stubby-dispatcher) by 2002:a05:693c:8108:b0:386:a1ae:6762 with SMTP id 5a478bee46e88-38752204559mr605294eec.36.1796349393922; Thu, 03 Dec 2026 17:56:33 -0800 (PST) Date: Thu, 3 Dec 2026 17:56:27 -0800 X-Mailing-List: linux-rt-devel@lists.linux.dev List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list Mime-Version: 1.0 X-Mailer: git-send-email 2.56.1.987.g2ec0ab4260-goog Message-ID: <20261204015630.4095988-1-surenb@google.com> Subject: [PATCH 0/3] alloc_tag: fixes for module tag area handling and the show_mem() report From: Suren Baghdasaryan To: akpm@linux-foundation.org Cc: david@kernel.org, hao.ge@linux.dev, liam@infradead.org, vbabka@kernel.org, hannes@cmpxchg.org, brendan.jackman@linux.dev, ziy@nvidia.com, bigeasy@linutronix.de, clrkwllms@kernel.org, rostedt@goodmis.org, pasha.tatashin@soleen.com, pyyjason@gmail.com, usamaarif642@gmail.com, surenb@google.com, linux-mm@kvack.org, linux-rt-devel@lists.linux.dev Content-Type: text/plain; charset="UTF-8" This series fixes three issues in memory allocation profiling which were reported by Sashiko. Patches 1 and 2 fix the error handling while operating on the maple tree which tracks the areas reserved for module allocation tags. Patch 3 fixes the locking used by the "Memory allocations" report in __show_mem(), which can be called from any context, including hardirq or NMI as well as on PREEMPT_RT. The series is based on mm-unstable. Suren Baghdasaryan (3): alloc_tag: preserve the error when reserving a module tag area fails alloc_tag: do not leak module tag areas when removing them fails mm/show_mem: avoid unsafe locking when reporting allocation profiling mm/alloc_tag.c | 47 +++++++++++++++++++++++++++++++++++++++++++---- mm/show_mem.c | 11 ++++++++--- 2 files changed, 51 insertions(+), 7 deletions(-) base-commit: e685fdf67323bade713c5f81015eda5094b3261b -- 2.56.1.987.g2ec0ab4260-goog