Skip to content

Commit b8f5221

Browse files
committed
Merge tag 'audit-pr-20241205' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/audit
Pull audit build problem workaround from Paul Moore: "A minor audit patch that shuffles some code slightly to workaround a GCC bug affecting a number of people. The GCC folks have been able to reproduce the problem and are discussing solutions (see the bug report link in the commit), but since the workaround is trivial let's do that in the kernel so we can unblock people who are hitting this" * tag 'audit-pr-20241205' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/audit: audit: workaround a GCC bug triggered by task comm changes
2 parents 6a10386 + d938150 commit b8f5221

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

kernel/auditsc.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2728,8 +2728,8 @@ void __audit_ptrace(struct task_struct *t)
27282728
context->target_auid = audit_get_loginuid(t);
27292729
context->target_uid = task_uid(t);
27302730
context->target_sessionid = audit_get_sessionid(t);
2731-
security_task_getlsmprop_obj(t, &context->target_ref);
27322731
strscpy(context->target_comm, t->comm);
2732+
security_task_getlsmprop_obj(t, &context->target_ref);
27332733
}
27342734

27352735
/**
@@ -2755,8 +2755,8 @@ int audit_signal_info_syscall(struct task_struct *t)
27552755
ctx->target_auid = audit_get_loginuid(t);
27562756
ctx->target_uid = t_uid;
27572757
ctx->target_sessionid = audit_get_sessionid(t);
2758-
security_task_getlsmprop_obj(t, &ctx->target_ref);
27592758
strscpy(ctx->target_comm, t->comm);
2759+
security_task_getlsmprop_obj(t, &ctx->target_ref);
27602760
return 0;
27612761
}
27622762

0 commit comments

Comments
 (0)