Linux Security Modules development
 help / color / mirror / Atom feed
* [PATCH] landlock: Add missing EINVAL case in the doc for landlock_add_rule
@ 2026-11-16 23:31 Tingmao Wang
  2026-11-16 23:34 ` sashiko-bot
  0 siblings, 1 reply; 2+ messages in thread
From: Tingmao Wang @ 2026-11-16 23:31 UTC (permalink / raw)
  To: Mickaël Salaün
  Cc: Tingmao Wang, Günther Noack, linux-security-module

This is another way it can return EINVAL but is not documented.  Documenting
it is useful to help rule out errors.

Signed-off-by: Tingmao Wang <m@maowtm.org>
---
 security/landlock/syscalls.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/security/landlock/syscalls.c b/security/landlock/syscalls.c
index fb5af318b69b..29e9d5d7399d 100644
--- a/security/landlock/syscalls.c
+++ b/security/landlock/syscalls.c
@@ -629,6 +629,7 @@ static int add_rule_capability(struct landlock_ruleset *const ruleset,
  * - %EAFNOSUPPORT: @rule_type is %LANDLOCK_RULE_NET_PORT but TCP/IP is not
  *   supported by the running kernel;
  * - %EINVAL: @flags is not valid;
+ * - %EINVAL: @rule_type is not valid;
  * - %EINVAL: The rule accesses are inconsistent (i.e.
  *   &landlock_path_beneath_attr.allowed_access or
  *   &landlock_net_port_attr.allowed_access is not a subset of the ruleset

base-commit: 57493c3b7f449a60d1c43322158671b98684f9b1
-- 
2.56.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-11-16 23:34 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-16 23:31 [PATCH] landlock: Add missing EINVAL case in the doc for landlock_add_rule Tingmao Wang
2026-11-16 23:34 ` sashiko-bot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox