summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Paris <eparis@redhat.com>2013-05-07 21:24:02 -0400
committerEric Paris <eparis@redhat.com>2013-05-07 22:27:21 -0400
commit82d8da0d46ae7d3e9089efadb5e8d9841c20a431 (patch)
tree363caec82ec31d6d8d7f4559f265d2521322fcb0
parent33e2208acfc15ce00d3dd13e839bf6434faa2b04 (diff)
downloadop-kernel-dev-82d8da0d46ae7d3e9089efadb5e8d9841c20a431.zip
op-kernel-dev-82d8da0d46ae7d3e9089efadb5e8d9841c20a431.tar.gz
Revert "audit: move kaudit thread start from auditd registration to kaudit init"
This reverts commit 6ff5e45985c2fcb97947818f66d1eeaf9d6600b2. Conflicts: kernel/audit.c This patch was starting a kthread for all the time. Since the follow on patches that required it didn't get finished in 3.10 time, we shouldn't ship this change in 3.10. Signed-off-by: Eric Paris <eparis@redhat.com>
-rw-r--r--kernel/audit.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/kernel/audit.c b/kernel/audit.c
index 8cc5803..f9c6506 100644
--- a/kernel/audit.c
+++ b/kernel/audit.c
@@ -644,6 +644,16 @@ static int audit_receive_msg(struct sk_buff *skb, struct nlmsghdr *nlh)
if (err)
return err;
+ /* As soon as there's any sign of userspace auditd,
+ * start kauditd to talk to it */
+ if (!kauditd_task)
+ kauditd_task = kthread_run(kauditd_thread, NULL, "kauditd");
+ if (IS_ERR(kauditd_task)) {
+ err = PTR_ERR(kauditd_task);
+ kauditd_task = NULL;
+ return err;
+ }
+
seq = nlh->nlmsg_seq;
data = nlmsg_data(nlh);
@@ -895,10 +905,6 @@ static int __init audit_init(void)
else
audit_sock->sk_sndtimeo = MAX_SCHEDULE_TIMEOUT;
- kauditd_task = kthread_run(kauditd_thread, NULL, "kauditd");
- if (IS_ERR(kauditd_task))
- return PTR_ERR(kauditd_task);
-
skb_queue_head_init(&audit_skb_queue);
skb_queue_head_init(&audit_skb_hold_queue);
audit_initialized = AUDIT_INITIALIZED;
OpenPOWER on IntegriCloud