[PATCH v1 0/4] Use scoped guards on Landlock

Mickaël Salaün mic at digikod.net
Mon Jan 13 16:11:08 UTC 2025


Using scoped guards helps simplifying error handling by removing goto
statements.

Only one macro was missing for mutex_lock() calls with
SINGLE_DEPTH_NESTING.

Regards,

Mickaël Salaün (4):
  landlock: Use scoped guards for ruleset
  landlock: Use scoped guards for ruleset in landlock_add_rule()
  locking/mutex: Add mutex_nest_1() scoped guard
  landlock: Use scoped guards for mutex

 include/linux/mutex.h        |  2 +
 security/landlock/ruleset.c  | 74 +++++++++++++++---------------------
 security/landlock/ruleset.h  |  5 +++
 security/landlock/syscalls.c | 39 ++++++-------------
 4 files changed, 50 insertions(+), 70 deletions(-)


base-commit: 9d89551994a430b50c4fffcb1e617a057fa76e20
-- 
2.47.1




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