aboutsummaryrefslogtreecommitdiffstats
path: root/lib/codetag.c
diff options
context:
space:
mode:
authorSuren Baghdasaryan <[email protected]>2024-03-21 16:36:54 +0000
committerAndrew Morton <[email protected]>2024-04-26 03:55:57 +0000
commit1438d349d16b78d88f9e978a4a5496f078c8191b (patch)
tree76b6f70d4dd5a24fd5f682da08d5d7961dc30330 /lib/codetag.c
parentrhashtable: plumb through alloc tag (diff)
downloadkernel-1438d349d16b78d88f9e978a4a5496f078c8191b.tar.gz
kernel-1438d349d16b78d88f9e978a4a5496f078c8191b.zip
lib: add memory allocations report in show_mem()
Include allocations in show_mem reports. Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Kent Overstreet <[email protected]> Signed-off-by: Suren Baghdasaryan <[email protected]> Reviewed-by: Vlastimil Babka <[email protected]> Tested-by: Kees Cook <[email protected]> Cc: Alexander Viro <[email protected]> Cc: Alex Gaynor <[email protected]> Cc: Alice Ryhl <[email protected]> Cc: Andreas Hindborg <[email protected]> Cc: Benno Lossin <[email protected]> Cc: "Björn Roy Baron" <[email protected]> Cc: Boqun Feng <[email protected]> Cc: Christoph Lameter <[email protected]> Cc: Dennis Zhou <[email protected]> Cc: Gary Guo <[email protected]> Cc: Miguel Ojeda <[email protected]> Cc: Pasha Tatashin <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Tejun Heo <[email protected]> Cc: Wedson Almeida Filho <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
Diffstat (limited to 'lib/codetag.c')
-rw-r--r--lib/codetag.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/codetag.c b/lib/codetag.c
index 408062f722ce..5ace625f2328 100644
--- a/lib/codetag.c
+++ b/lib/codetag.c
@@ -36,6 +36,11 @@ void codetag_lock_module_list(struct codetag_type *cttype, bool lock)
up_read(&cttype->mod_lock);
}
+bool codetag_trylock_module_list(struct codetag_type *cttype)
+{
+ return down_read_trylock(&cttype->mod_lock) != 0;
+}
+
struct codetag_iterator codetag_get_ct_iter(struct codetag_type *cttype)
{
struct codetag_iterator iter = {