Commit 61c0ee8792165f0de7c4aa619343998a6966c1ef

Authored by Paul Davies C
Committed by Eric Paris
1 parent 40c0775e5e

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>

Showing 1 changed file with 2 additions and 8 deletions Side-by-side Diff

... ... @@ -2368,13 +2368,6 @@
2368 2368 audit_log_untrustedstring(ab, current->comm);
2369 2369 }
2370 2370  
2371   -static void audit_log_abend(struct audit_buffer *ab, char *reason, long signr)
2372   -{
2373   - audit_log_task(ab);
2374   - audit_log_format(ab, " reason=");
2375   - audit_log_string(ab, reason);
2376   - audit_log_format(ab, " sig=%ld", signr);
2377   -}
2378 2371 /**
2379 2372 * audit_core_dumps - record information about processes that end abnormally
2380 2373 * @signr: signal value
... ... @@ -2395,7 +2388,8 @@
2395 2388 ab = audit_log_start(NULL, GFP_KERNEL, AUDIT_ANOM_ABEND);
2396 2389 if (unlikely(!ab))
2397 2390 return;
2398   - audit_log_abend(ab, "memory violation", signr);
  2391 + audit_log_task(ab);
  2392 + audit_log_format(ab, " sig=%ld", signr);
2399 2393 audit_log_end(ab);
2400 2394 }
2401 2395