aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorDavid Woodhouse <dwmw2@shinybook.infradead.org>2005-06-22 10:04:33 -0400
committerDavid Woodhouse <dwmw2@shinybook.infradead.org>2005-06-22 10:04:33 -0400
commit9ad9ad385be27fcc7c16d290d972c6173e780a61 (patch)
treebbca700c2d88ba421a6c9c348de367eaf4de0e2c /include
parent177bbc733a1d9c935bc3d6efd776a6699b29b1ca (diff)
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>
Diffstat (limited to 'include')
-rw-r--r--include/linux/audit.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/include/linux/audit.h b/include/linux/audit.h
index 77adef640537..2f56546eb248 100644
--- a/include/linux/audit.h
+++ b/include/linux/audit.h
@@ -259,11 +259,11 @@ extern int audit_filter_user(int pid, int type);
259#ifdef CONFIG_AUDIT 259#ifdef CONFIG_AUDIT
260/* These are defined in audit.c */ 260/* These are defined in audit.c */
261 /* Public API */ 261 /* Public API */
262extern void audit_log(struct audit_context *ctx, int type, 262extern void audit_log(struct audit_context *ctx, int gfp_mask,
263 const char *fmt, ...) 263 int type, const char *fmt, ...)
264 __attribute__((format(printf,3,4))); 264 __attribute__((format(printf,4,5)));
265 265
266extern struct audit_buffer *audit_log_start(struct audit_context *ctx,int type); 266extern struct audit_buffer *audit_log_start(struct audit_context *ctx, int gfp_mask, int type);
267extern void audit_log_format(struct audit_buffer *ab, 267extern void audit_log_format(struct audit_buffer *ab,
268 const char *fmt, ...) 268 const char *fmt, ...)
269 __attribute__((format(printf,2,3))); 269 __attribute__((format(printf,2,3)));