Debug the timing and stalling of calls to audit_receive() for
processes we care about.
Signed-off-by: Richard Guy Briggs <rgb(a)redhat.com>
---
kernel/audit.c | 16 ++++++++++++++++
1 files changed, 16 insertions(+), 0 deletions(-)
diff --git a/kernel/audit.c b/kernel/audit.c
index 9e9c02b..76b6878 100644
--- a/kernel/audit.c
+++ b/kernel/audit.c
@@ -1136,6 +1136,18 @@ static void audit_receive(struct sk_buff *skb)
pid_t pid = 0;
+ int pr = 0;
+ //pid_t audit_pid_cached;
+ pid_t audit_pid_cached = audit_pid;
+
+ if (current->tgid == 1 || (audit_pid && audit_pid == current->tgid)) {
+ //pr_warn("( %lu )audit_receive apid=%d pid=%d(%s) Qlen=%d\n",
+ //jiffies, audit_pid, current->pid, current->comm,
skb_queue_len(&audit_skb_queue));
+ pr = 1;
+ //} else {
+ //audit_pid_cached = audit_pid;
+ }
+
if (!mutex_trylock(&audit_cmd_mutex)) {
rcu_read_lock();
owner = ACCESS_ONCE(audit_cmd_mutex.owner);
@@ -1150,6 +1162,10 @@ static void audit_receive(struct sk_buff *skb)
}
audit_receive_skb(skb);
mutex_unlock(&audit_cmd_mutex);
+
+ if (pr || current->tgid == 1 || (audit_pid && audit_pid ==
current->tgid))
+ pr_warn("( %lu %lu )audit_receive-exit apid=%d apid-old=%d pid=%d(%s)
Qlen=%d\n",
+ trytime, jiffies - trytime, audit_pid, audit_pid_cached, current->pid,
current->comm, skb_queue_len(&audit_skb_queue));
}
/* Run custom bind function on netlink socket group connect or bind requests. */
--
1.7.1