Commit c85bf197 authored by Gustavo Luiz Duarte's avatar Gustavo Luiz Duarte Committed by Jakub Kicinski
Browse files

netconsole: fix appending sysdata when sysdata_fields == SYSDATA_RELEASE



Before appending sysdata, prepare_extradata() checks if any feature is
enabled in sysdata_fields (and exits early if none is enabled).

When SYSDATA_RELEASE was introduced, we missed adding it to the list of
features being checked against sysdata_fields in prepare_extradata().
The result was that, if only SYSDATA_RELEASE is enabled in
sysdata_fields, we incorreclty exit early and fail to append the
release.

Instead of checking specific bits in sysdata_fields, check if
sysdata_fields has ALL bit zeroed and exit early if true. This fixes
case when only SYSDATA_RELEASE enabled and makes the code more general /
less error prone in future feature implementation.

Signed-off-by: default avatarGustavo Luiz Duarte <gustavold@gmail.com>
Reviewed-by: default avatarBreno Leitao <leitao@debian.org>
Fixes: cfcc9239 ("netconsole: append release to sysdata")
Link: https://patch.msgid.link/20250609-netconsole-fix-v1-1-17543611ae31@gmail.com


Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 2660a544
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment