diff options
| author | Karl Mehltretter <kmehltretter@gmail.com> | 2026-09-12 02:03:02 +0200 |
|---|---|---|
| committer | John Johansen <john.johansen@canonical.com> | 2026-10-29 08:30:53 -0700 |
| commit | fcd621debff51f09cc665e1063a6025d7c1bfd48 (patch) | |
| tree | 03cb24d0b01eab98fe6577c743a72f2f40472deb /security | |
| parent | e667fc72f7f4a54674962c324048ca2cc58bc703 (diff) | |
apparmor: Fix the return value in split_token_from_name() kernel-doc
split_token_from_name() returns ERR_PTR(-EINVAL) for malformed input,
but its kernel-doc describes NULL as the failure result. NULL is instead
a successful result when the name following the token is empty.
Document all three results: the name, NULL for an empty name, and an
error pointer for malformed input.
Assisted-by: LLM
Signed-off-by: Karl Mehltretter <kmehltretter@gmail.com>
Signed-off-by: John Johansen <john.johansen@canonical.com>
Diffstat (limited to 'security')
| -rw-r--r-- | security/apparmor/procattr.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/security/apparmor/procattr.c b/security/apparmor/procattr.c index c07b6e8fd9c9..cfc45db43aa0 100644 --- a/security/apparmor/procattr.c +++ b/security/apparmor/procattr.c @@ -74,7 +74,8 @@ int aa_getprocattr(struct aa_label *label, char **string, bool newline) * @args: string to parse (NOT NULL) * @token: stores returned parsed token value (NOT NULL) * - * Returns: start position of name after token else NULL on failure + * Returns: the name following the token, %NULL if the name is empty, or + * ERR_PTR(-EINVAL) if the input is malformed. */ static char *split_token_from_name(const char *op, char *args, u64 *token) { |
