From: Alejandro Colomar <alx@kernel.org>
To: Paul Moore <paul@paul-moore.com>,
James Morris <jmorris@namei.org>,
"Serge E. Hallyn" <serge@hallyn.com>,
linux-security-module@vger.kernel.org
Cc: Alejandro Colomar <alx@kernel.org>
Subject: [PATCH] security: Add missing const
Date: Wed, 25 Nov 2026 19:22:42 +0100 [thread overview]
Message-ID: <41df4fcaea9d5eb41d07ffb4119621fb2f233b79.1795630921.git.alx@kernel.org> (raw)
[-- Attachment #1: Type: text/plain, Size: 890 bytes --]
This pointer is derived from other const pointers.
Signed-off-by: Alejandro Colomar <alx@kernel.org>
---
Hi,
This was found while changing some <linux/string.h> APIs to preserve the
const qualifier in the return type.
Have a lovely night!
Alex
security/apparmor/lib.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/security/apparmor/lib.c b/security/apparmor/lib.c
index 73b88bde40bb..48c527170916 100644
--- a/security/apparmor/lib.c
+++ b/security/apparmor/lib.c
@@ -193,7 +193,7 @@ const char *aa_splitn_fqname(const char *fqname, size_t n, const char **ns_name,
return NULL;
if (name[0] == ':') {
- char *split = strnchr(&name[1], end - &name[1], ':');
+ const char *split = strnchr(&name[1], end - &name[1], ':');
*ns_name = skipn_spaces(&name[1], end - &name[1]);
if (!*ns_name)
return NULL;
--
2.55.0
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next reply other threads:[~2026-11-25 18:22 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-25 18:22 Alejandro Colomar [this message]
2026-11-25 18:25 ` [PATCH] security: Add missing const sashiko-bot
2026-11-26 3:31 ` Guicai Ma
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=41df4fcaea9d5eb41d07ffb4119621fb2f233b79.1795630921.git.alx@kernel.org \
--to=alx@kernel.org \
--cc=jmorris@namei.org \
--cc=linux-security-module@vger.kernel.org \
--cc=paul@paul-moore.com \
--cc=serge@hallyn.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox