apparmor: use SEND_SIG_NOINFO instead of NULL in aa_audit()

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>
Acked-by: Georgia Garcia <georgia.garcia@canonical.com>
Signed-off-by: John Johansen <john.johansen@canonical.com>
This commit is contained in:
Oleg Nesterov 2026-07-05 18:52:45 +02:00 committed by John Johansen
parent efede141dc
commit 485d3f5760

View File

@ -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);