Skip to content

Commit

Permalink
[PATCH] kauditd_thread warning fix
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Andrew Morton authored and Linus Torvalds committed Oct 6, 2006
1 parent d195412 commit 4899b8b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion kernel/audit.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -369,6 +369,7 @@ static int kauditd_thread(void *dummy)
remove_wait_queue(&kauditd_wait, &wait);
}
}
return 0;
}

int audit_send_list(void *_dest)
Expand Down

0 comments on commit 4899b8b

Please sign in to comment.