From: Eric Paris Date: Mon, 7 Jan 2008 19:01:18 +0000 (-0500) Subject: [AUDIT] do not panic on exclude messages in audit_log_pid_context() X-Git-Url: http://drtracing.org/?a=commitdiff_plain;h=6246ccab99093a562044596dd868213caa0b2b4c;p=deliverable%2Flinux.git [AUDIT] do not panic on exclude messages in audit_log_pid_context() If we fail to get an ab in audit_log_pid_context this may be due to an exclude rule rather than a memory allocation failure. If it was due to a memory allocation failue we would have already paniced and no need to do it again. Signed-off-by: Eric Paris --- diff --git a/kernel/auditsc.c b/kernel/auditsc.c index 6e5de767bad1..aaaca8a13bbe 100644 --- a/kernel/auditsc.c +++ b/kernel/auditsc.c @@ -948,7 +948,7 @@ static int audit_log_pid_context(struct audit_context *context, pid_t pid, ab = audit_log_start(context, GFP_KERNEL, AUDIT_OBJ_PID); if (!ab) - return 1; + return rc; audit_log_format(ab, "opid=%d oauid=%d ouid=%d oses=%d", pid, auid, uid, sessionid);