mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-22 23:04:43 +00:00
AUDIT: Wait for backlog to clear when generating messages.
Add a gfp_mask to audit_log_start() and audit_log(), to reduce the amount of GFP_ATOMIC allocation -- most of it doesn't need to be GFP_ATOMIC. Also if the mask includes __GFP_WAIT, then wait up to 60 seconds for the auditd backlog to clear instead of immediately abandoning the message. The timeout should probably be made configurable, but for now it'll suffice that it only happens if auditd is actually running. Signed-off-by: David Woodhouse <dwmw2@infradead.org>
This commit is contained in:
parent
177bbc733a
commit
9ad9ad385b
6 changed files with 61 additions and 31 deletions
|
@ -259,11 +259,11 @@ extern int audit_filter_user(int pid, int type);
|
|||
#ifdef CONFIG_AUDIT
|
||||
/* These are defined in audit.c */
|
||||
/* Public API */
|
||||
extern void audit_log(struct audit_context *ctx, int type,
|
||||
const char *fmt, ...)
|
||||
__attribute__((format(printf,3,4)));
|
||||
extern void audit_log(struct audit_context *ctx, int gfp_mask,
|
||||
int type, const char *fmt, ...)
|
||||
__attribute__((format(printf,4,5)));
|
||||
|
||||
extern struct audit_buffer *audit_log_start(struct audit_context *ctx,int type);
|
||||
extern struct audit_buffer *audit_log_start(struct audit_context *ctx, int gfp_mask, int type);
|
||||
extern void audit_log_format(struct audit_buffer *ab,
|
||||
const char *fmt, ...)
|
||||
__attribute__((format(printf,2,3)));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue