Commit 4899b8b1 authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] kauditd_thread warning fix

Squash this warning:

  kernel/audit.c: In function 'kauditd_thread':
  kernel/audit.c:367: warning: no return statement in function returning non-void

We might as test kthread_should_stop(), although it's not very pointful at
present.

The code which starts this thread looks racy - the kernel could start multiple
threads.

Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Jeff Garzik <jeff@garzik.org>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent d195412c
...@@ -340,7 +340,7 @@ static int kauditd_thread(void *dummy) ...@@ -340,7 +340,7 @@ static int kauditd_thread(void *dummy)
{ {
struct sk_buff *skb; struct sk_buff *skb;
while (1) { while (!kthread_should_stop()) {
skb = skb_dequeue(&audit_skb_queue); skb = skb_dequeue(&audit_skb_queue);
wake_up(&audit_backlog_wait); wake_up(&audit_backlog_wait);
if (skb) { if (skb) {
...@@ -369,6 +369,7 @@ static int kauditd_thread(void *dummy) ...@@ -369,6 +369,7 @@ static int kauditd_thread(void *dummy)
remove_wait_queue(&kauditd_wait, &wait); remove_wait_queue(&kauditd_wait, &wait);
} }
} }
return 0;
} }
int audit_send_list(void *_dest) int audit_send_list(void *_dest)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment