opnsense-src/sys/security/audit
Konstantin Belousov 0452f5f7b3 audit: move the wait from the queue length from the commit to alloc
AUDIT_SYSCALL_EXIT() and indirectly audit_commit() is intended to be
called from arbitrary top-level context.  This means that any sleepable
locks can be owned by the caller, and which makes the sleeping in
audit_commit() forbidden.

Since we need to sleep for the record in audit_alloc() anyway, move the
sleep for the queue limit there.  At worst, if the audit is suspended is
disabled when we actually reach the commit location, this means that we
lost time uselessly.

PR:	287566
Reviewed by:	markj
Tested by:	pho
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D50879
2025-06-18 20:57:49 +03:00
..
audit.c audit: move the wait from the queue length from the commit to alloc 2025-06-18 20:57:49 +03:00
audit.h audit: Fix short-circuiting in syscallenter() 2025-01-14 14:19:28 +00:00
audit_arg.c cred: kern_setgroups(): Internally use int as number of groups' type 2024-11-02 21:37:41 +01:00
audit_bsm.c sys: Automated cleanup of cdefs and other formatting 2023-11-26 22:24:00 -07:00
audit_bsm_db.c sys: Automated cleanup of cdefs and other formatting 2023-11-26 22:24:00 -07:00
audit_bsm_klib.c sys: Automated cleanup of cdefs and other formatting 2023-11-26 22:24:00 -07:00
audit_dtrace.c sys: Automated cleanup of cdefs and other formatting 2023-11-26 22:24:00 -07:00
audit_ioctl.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
audit_pipe.c kern: Make fileops and filterops tables const where possible 2024-11-26 21:04:21 +00:00
audit_private.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
audit_syscalls.c sys: Automated cleanup of cdefs and other formatting 2023-11-26 22:24:00 -07:00
audit_trigger.c sys: Automated cleanup of cdefs and other formatting 2023-11-26 22:24:00 -07:00
audit_worker.c machine/stdarg.h -> sys/stdarg.h 2025-06-11 17:39:02 +01:00
bsm_domain.c sys: Automated cleanup of cdefs and other formatting 2023-11-26 22:24:00 -07:00
bsm_errno.c sys: Automated cleanup of cdefs and other formatting 2023-11-26 22:24:00 -07:00
bsm_fcntl.c sys: Automated cleanup of cdefs and other formatting 2023-11-26 22:24:00 -07:00
bsm_socket_type.c sys: Automated cleanup of cdefs and other formatting 2023-11-26 22:24:00 -07:00
bsm_token.c sys: Automated cleanup of cdefs and other formatting 2023-11-26 22:24:00 -07:00