summary refs log tree commit diff
path: root/kernel/auditsc.c
diff options
context:
space:
mode:
authorPaul Davies C <pauldaviesc@gmail.com>2013-11-08 09:57:39 +0530
committerEric Paris <eparis@redhat.com>2014-01-13 22:30:59 -0500
commit61c0ee8792165f0de7c4aa619343998a6966c1ef (patch)
treed42ef9b98bd91c212b0d05aa8111615fbedc22e4 /kernel/auditsc.c
parent40c0775e5ea47667db497565b79a8dc154530992 (diff)
downloadlinux-61c0ee8792165f0de7c4aa619343998a6966c1ef.tar.gz
audit: drop audit_log_abend()
The audit_log_abend() is used only by the audit_core_dumps(). Thus there is no
need of maintaining the audit_log_abend() as a separate function.

This patch drops the audit_log_abend() and pushes its functionalities back to
the audit_core_dumps(). Apart from that the "reason" field is also dropped
from being logged since the reason can be deduced from the signal number.

Signed-off-by: Paul Davies C <pauldaviesc@gmail.com>
Acked-by: Eric Paris <eparis@redhat.com>
Signed-off-by: Richard Guy Briggs <rgb@redhat.com>
Signed-off-by: Eric Paris <eparis@redhat.com>
Diffstat (limited to 'kernel/auditsc.c')
-rw-r--r--kernel/auditsc.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/kernel/auditsc.c b/kernel/auditsc.c
index 9ab02fa2334c..fc3b3dbcc8aa 100644
--- a/kernel/auditsc.c
+++ b/kernel/auditsc.c
@@ -2368,13 +2368,6 @@ static void audit_log_task(struct audit_buffer *ab)
 	audit_log_untrustedstring(ab, current->comm);
 }
 
-static void audit_log_abend(struct audit_buffer *ab, char *reason, long signr)
-{
-	audit_log_task(ab);
-	audit_log_format(ab, " reason=");
-	audit_log_string(ab, reason);
-	audit_log_format(ab, " sig=%ld", signr);
-}
 /**
  * audit_core_dumps - record information about processes that end abnormally
  * @signr: signal value
@@ -2395,7 +2388,8 @@ void audit_core_dumps(long signr)
 	ab = audit_log_start(NULL, GFP_KERNEL, AUDIT_ANOM_ABEND);
 	if (unlikely(!ab))
 		return;
-	audit_log_abend(ab, "memory violation", signr);
+	audit_log_task(ab);
+	audit_log_format(ab, " sig=%ld", signr);
 	audit_log_end(ab);
 }