KEYS: trusted: Avoid calling null function trusted_key_exit
Subsystems (4)
PATCH 1/1 KEYS: trusted: Avoid calling null function trusted_key_exit
If one loads and unloads the trusted module, trusted_key_exit can be NULL. Call it through static_call_cond() to avoid a kernel trap.
--- security/keys/trusted-keys/trusted_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
security/keys/trusted-keys/trusted_core.c +1 -1
@@ -351,7 +351,7 @@ static int __init init_trusted(void) static void __exit cleanup_trusted(void) { -static_call (trusted_key_exit)(); +static_call_cond (trusted_key_exit)(); }late_initcall (init_trusted);
Signature · 1 line
2.35.0
Jarkko Sakkinen
maintainerQuoted 6 lines · Dave Kleikamp
If one loads and unloads the trusted module,
trusted_key_exitcan be NULL. Call it throughstatic_call_cond()to avoid a kernel trap.Fixes 5d0682be3189 ("KEYS: trusted: Add generic trusted keys framework")Signed-off-by Dave Kleikamp <[email protected]>
Please re-send with cc stable and the empty line removed and I'll pick it.
BR, Jarkko
Quoted 9 lines · Jarkko Sakkinen
Quoted 6 lines · Dave Kleikamp
If one loads and unloads the trusted module,
trusted_key_exitcan be NULL. Call it throughstatic_call_cond()to avoid a kernel trap.Fixes 5d0682be3189 ("KEYS: trusted: Add generic trusted keys framework")Signed-off-by Dave Kleikamp <[email protected]>Please re-send with cc stable and the empty line removed and I'll pick it.
I re-sent a v2, but haven't seen any response from you.
I can send it again, or feel free to clean up those lines yourself.
Thanks,
Shaggy
Quoted 2 lines
BR, Jarkko
Quoted 9 lines · Dave Kleikamp
Quoted 8 lines · Jarkko Sakkinen
Quoted 6 lines · Dave Kleikamp
If one loads and unloads the trusted module,
trusted_key_exitcan be NULL. Call it throughstatic_call_cond()to avoid a kernel trap.Fixes 5d0682be3189 ("KEYS: trusted: Add generic trusted keys framework")Signed-off-by Dave Kleikamp <[email protected]>
Quoted 8 lines
Quoted 1 line
Please re-send with cc stable and the empty line removed and I'll pick it.
I re-sent a v2, but haven't seen any response from you.
I can send it again, or feel free to clean up those lines yourself.
Thanks,
Shaggy
I've applied the patch. Thank you, and apologies for the latency.
BR, Jarkko