[PATCH v1] landlock: Remove incorrect warning

Günther Noack gnoack at google.com
Tue Apr 1 11:51:00 UTC 2025


On Mon, Mar 31, 2025 at 12:47:07PM +0200, Mickaël Salaün wrote:
> 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.

Reviewed-by: Günther Noack <gnoack at google.com>

-Günther



More information about the Linux-security-module-archive mailing list