]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
[PATCH] kauditd_thread warning fix
authorAndrew Morton <akpm@osdl.org>
Fri, 6 Oct 2006 07:43:48 +0000 (00:43 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Fri, 6 Oct 2006 15:53:39 +0000 (08:53 -0700)
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>
kernel/audit.c

index f9889ee778256ddb7336c2527ab0c0fe48754d87..98106f6078b0005a89ef889574441c663f40732f 100644 (file)
@@ -340,7 +340,7 @@ static int kauditd_thread(void *dummy)
 {
        struct sk_buff *skb;
 
-       while (1) {
+       while (!kthread_should_stop()) {
                skb = skb_dequeue(&audit_skb_queue);
                wake_up(&audit_backlog_wait);
                if (skb) {
@@ -369,6 +369,7 @@ static int kauditd_thread(void *dummy)
                        remove_wait_queue(&kauditd_wait, &wait);
                }
        }
+       return 0;
 }
 
 int audit_send_list(void *_dest)