Skip to content
Unverified Commit fe81536a authored by Mickaël Salaün's avatar Mickaël Salaün
Browse files

landlock: Remove incorrect warning



landlock_put_hierarchy() can be called when an error occurs in
landlock_merge_ruleset() due to insufficient memory.  In this case, the
domain's audit details might not have been allocated yet, which would
cause landlock_free_hierarchy_details() to print a warning (but still
safely handle this case).

We could keep the WARN_ON_ONCE(!hierarchy) but it's not worth it for
this kind of function, so let's remove it entirely.

Cc: Paul Moore <paul@paul-moore.com>
Reported-by: default avatar <syzbot+8bca99e91de7e060e4ea@syzkaller.appspotmail.com>
Link: https://lore.kernel.org/r/20250331104709.897062-1-mic@digikod.net


Reviewed-by: default avatarGünther Noack <gnoack@google.com>
Signed-off-by: default avatarMickaël Salaün <mic@digikod.net>
parent 0af2f6be
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment