/[base]
ViewVC logotype

Revision 337242


Jump to revision: Previous Next
Author: asomers
Date: Fri Aug 3 14:05:22 2018 UTC (5 years, 11 months ago)
Changed paths: 3
Log Message:
MFC r336205:

Don't acquire evclass_lock with a spinlock held

When the "pc" audit class is enabled and auditd is running, witness will
panic during thread exit because au_event_class tries to lock an rwlock
while holding a spinlock acquired upstack by thread_exit.

To fix this, move AUDIT_SYSCALL_EXIT futher upstack, before the spinlock is
acquired. Of thread_exit's 16 callers, it's only necessary to call
AUDIT_SYSCALL_EXIT from two, exit1 (for exiting processes) and kern_thr_exit
(for exiting threads). The other callers are all kernel threads, which
needen't call AUDIT_SYSCALL_EXIT because since they can't make syscalls
there will be nothing to audit.  And exit1 already does call
AUDIT_SYSCALL_EXIT, making the second call in thread_exit redundant for that
case.

PR:		228444
Reported by:	aniketp
Reviewed by:	aniketp, kib
Differential Revision:	https://reviews.freebsd.org/D16210


Changed paths

Path Details
Directorystable/11/ modified , props changed
Directorystable/11/sys/kern/kern_thr.c modified , text changed
Directorystable/11/sys/kern/kern_thread.c modified , text changed

  ViewVC Help
Powered by ViewVC 1.1.27