Commit 4899b8b16b302299cc91289f7b5bac295e9ab387

Authored by Andrew Morton
Committed by Linus Torvalds
1 parent d195412c35

[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: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>

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

... ... @@ -340,7 +340,7 @@
340 340 {
341 341 struct sk_buff *skb;
342 342  
343   - while (1) {
  343 + while (!kthread_should_stop()) {
344 344 skb = skb_dequeue(&audit_skb_queue);
345 345 wake_up(&audit_backlog_wait);
346 346 if (skb) {
... ... @@ -369,6 +369,7 @@
369 369 remove_wait_queue(&kauditd_wait, &wait);
370 370 }
371 371 }
  372 + return 0;
372 373 }
373 374  
374 375 int audit_send_list(void *_dest)