Skip to content

Commit

Permalink
Revert "audit: move kaudit thread start from auditd registration to k…
Browse files Browse the repository at this point in the history
…audit init"

This reverts commit 6ff5e45.

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>
  • Loading branch information
Eric Paris committed May 8, 2013
1 parent 33e2208 commit 82d8da0
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions kernel/audit.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 82d8da0

Please sign in to comment.