diff options
author | Breno Leitao <leitao@debian.org> | 2025-02-28 04:50:20 -0800 |
---|---|---|
committer | Paolo Abeni <pabeni@redhat.com> | 2025-03-04 15:28:28 +0100 |
commit | 33e4b29f2b3b7d013629bb86abe5cb726ec91199 (patch) | |
tree | a884a1c6accdea3c4d28c984582b08291b287c1d /drivers/net/netconsole.c | |
parent | 4d989521a93bcabce7c18060d5cf98a207d56cbe (diff) |
netconsole: add taskname to extradata entry count
New SYSDATA_TASKNAME feature flag to track when taskname append is enabled.
Additional check in count_extradata_entries() to include taskname in
total, counting it as an entry in extradata. This function is used to
check if we are not overflowing the number of extradata items.
Signed-off-by: Breno Leitao <leitao@debian.org>
Reviewed-by: Simon Horman <horms@kernel.org>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Diffstat (limited to 'drivers/net/netconsole.c')
-rw-r--r-- | drivers/net/netconsole.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/net/netconsole.c b/drivers/net/netconsole.c index 96153fd01f46..f46a0edf9c11 100644 --- a/drivers/net/netconsole.c +++ b/drivers/net/netconsole.c @@ -104,6 +104,8 @@ struct netconsole_target_stats { enum sysdata_feature { /* Populate the CPU that sends the message */ SYSDATA_CPU_NR = BIT(0), + /* Populate the task name (as in current->comm) in sysdata */ + SYSDATA_TASKNAME = BIT(1), }; /** @@ -701,6 +703,8 @@ static size_t count_extradata_entries(struct netconsole_target *nt) /* Plus sysdata entries */ if (nt->sysdata_fields & SYSDATA_CPU_NR) entries += 1; + if (nt->sysdata_fields & SYSDATA_TASKNAME) + entries += 1; return entries; } |