]> git.baikalelectronics.ru Git - kernel.git/commit
audit: free audit_proctitle only on task exit
authorRichard Guy Briggs <rgb@redhat.com>
Thu, 25 Aug 2022 19:32:39 +0000 (15:32 -0400)
committerPaul Moore <paul@paul-moore.com>
Fri, 26 Aug 2022 21:18:54 +0000 (17:18 -0400)
commitc90b7b900f14a013b5222092c93e8a604990d571
tree26d38decb0f81c03a46a726f89f54334f3de7379
parent61967b323c7b2408f083c156a09f2102c6113837
audit: free audit_proctitle only on task exit

Since audit_proctitle is generated at syscall exit time, its value is
used immediately and cached for the next syscall.  Since this is the
case, then only clear it at task exit time.  Otherwise, there is no
point in caching the value OR bearing the overhead of regenerating it.

Fixes: 79ed1a2d5572 ("audit: prepare audit_context for use in calling contexts beyond syscalls")
Signed-off-by: Richard Guy Briggs <rgb@redhat.com>
Signed-off-by: Paul Moore <paul@paul-moore.com>
kernel/auditsc.c