Commit c85bf19
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: Gustavo Luiz Duarte <[email protected]>
Reviewed-by: Breno Leitao <[email protected]>
Fixes: cfcc923 ("netconsole: append release to sysdata")
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Jakub Kicinski <[email protected]>1 parent 2660a54 commit c85bf19
1 file changed
+1
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1252 | 1252 | | |
1253 | 1253 | | |
1254 | 1254 | | |
1255 | | - | |
1256 | 1255 | | |
1257 | 1256 | | |
1258 | 1257 | | |
1259 | 1258 | | |
1260 | 1259 | | |
1261 | 1260 | | |
1262 | 1261 | | |
1263 | | - | |
| 1262 | + | |
1264 | 1263 | | |
1265 | 1264 | | |
1266 | 1265 | | |
| |||
0 commit comments