From cfc98d1cb47744d37d4b0a897dd825ef43298c31 Mon Sep 17 00:00:00 2001 From: Kent Overstreet Date: Sat, 24 Feb 2024 16:59:53 -0500 Subject: codetag.idx Signed-off-by: Kent Overstreet --- include/linux/codetag.h | 11 ++++++----- lib/codetag.c | 4 ++++ 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/include/linux/codetag.h b/include/linux/codetag.h index 6aa8cf22d88b..b5a58d82c0a2 100644 --- a/include/linux/codetag.h +++ b/include/linux/codetag.h @@ -19,11 +19,12 @@ struct module; * an array of these. */ struct codetag { - unsigned int flags; /* used in later patches */ - unsigned int lineno; - const char *modname; - const char *function; - const char *filename; + u16 idx; + u16 flags; /* used in later patches */ + u32 lineno; + const char *modname; + const char *function; + const char *filename; } __aligned(8); union codetag_ref { diff --git a/lib/codetag.c b/lib/codetag.c index 5890cecab383..8c47d3d4a367 100644 --- a/lib/codetag.c +++ b/lib/codetag.c @@ -244,6 +244,10 @@ insert_done: rcu_assign_pointer(cttype->mods_rcu, new_mods); kfree_rcu(old_mods, rcu); + + for (unsigned i = 0; i < cmod.nr; i++) + __idx_to_codetag(cttype, &cmod, cmod.idx + i)->idx = cmod.idx + i; + return 0; } -- cgit v1.2.3