The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Oleg Nesterov <oleg@redhat.com>
To: John Johansen <john.johansen@canonical.com>,
	Georgia Garcia <georgia.garcia@canonical.com>,
	Paul Moore <paul@paul-moore.com>,
	James Morris <jmorris@namei.org>,
	"Serge E. Hallyn" <serge@hallyn.com>
Cc: apparmor@lists.ubuntu.com, linux-kernel@vger.kernel.org
Subject: [PATCH] apparmor: use SEND_SIG_NOINFO instead of NULL in aa_audit()
Date: Sun, 5 Jul 2026 18:52:45 +0200	[thread overview]
Message-ID: <akqL3YWi28ZUzca3@redhat.com> (raw)

SEND_SIG_NOINFO is defined as ((struct kernel_siginfo *) 0), so passing
NULL works, but:

- this works "by accident" and looks as if the caller doesn't understand
  the signal sending API.

- more importantly, this hides the usage of SEND_SIG_NOINFO from grep,
  and this is really bad.

Signed-off-by: Oleg Nesterov <oleg@redhat.com>
---
 security/apparmor/audit.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/security/apparmor/audit.c b/security/apparmor/audit.c
index 4a60b6fda75f..15e42e96b163 100644
--- a/security/apparmor/audit.c
+++ b/security/apparmor/audit.c
@@ -192,7 +192,7 @@ int aa_audit(int type, struct aa_profile *profile,
 	aa_audit_msg(type, ad, cb);
 
 	if (ad->type == AUDIT_APPARMOR_KILL)
-		(void)send_sig_info(profile->signal, NULL,
+		send_sig_info(profile->signal, SEND_SIG_NOINFO,
 			ad->common.type == LSM_AUDIT_DATA_TASK &&
 			ad->common.u.tsk ? ad->common.u.tsk : current);
 
-- 
2.52.0



             reply	other threads:[~2026-07-05 16:52 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-05 16:52 Oleg Nesterov [this message]
2026-07-05 17:53 ` [PATCH] apparmor: use SEND_SIG_NOINFO instead of NULL in aa_audit() Bradley Morgan
2026-07-05 18:48   ` Oleg Nesterov
2026-07-05 18:52     ` Bradley Morgan

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=akqL3YWi28ZUzca3@redhat.com \
    --to=oleg@redhat.com \
    --cc=apparmor@lists.ubuntu.com \
    --cc=georgia.garcia@canonical.com \
    --cc=jmorris@namei.org \
    --cc=john.johansen@canonical.com \
    --cc=linux-kernel@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