Unverified Commit d32f79a5 authored by Mickaël Salaün's avatar Mickaël Salaün
Browse files

landlock: Use scoped guards for ruleset



Simplify error handling by replacing goto statements with automatic
calls to landlock_put_ruleset() when going out of scope.

This change will be easy to backport to v6.6 if needed, only the
kernel.h include line conflicts.  As for any other similar changes, we
should be careful when backporting without goto statements.

Add missing include file.

Reviewed-by: default avatarGünther Noack <gnoack@google.com>
Link: https://lore.kernel.org/r/20250113161112.452505-2-mic@digikod.net


Signed-off-by: default avatarMickaël Salaün <mic@digikod.net>
parent 25ccc75f
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment