[AUDIT] do not panic on exclude messages in audit_log_pid_context()

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Linux Kernel Mailing List
Date: Friday, February 1, 2008 - 3:59 pm

Gitweb:     http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=6246cc...
Commit:     6246ccab99093a562044596dd868213caa0b2b4c
Parent:     c0641f28dcbecb6dc34a4fd003a9947fcd080696
Author:     Eric Paris <eparis@redhat.com>
AuthorDate: Mon Jan 7 14:01:18 2008 -0500
Committer:  Al Viro <viro@zeniv.linux.org.uk>
CommitDate: Fri Feb 1 14:07:46 2008 -0500

    [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 <eparis@redhat.com>
---
 kernel/auditsc.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/kernel/auditsc.c b/kernel/auditsc.c
index 6e5de76..aaaca8a 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);
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[AUDIT] do not panic on exclude messages in audit_log_pid_ ..., Linux Kernel Mailing ..., (Fri Feb 1, 3:59 pm)