diff options
author | Andrew Morton <akpm@osdl.org> | 2006-10-06 03:43:48 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-10-06 11:53:39 -0400 |
commit | 4899b8b16b302299cc91289f7b5bac295e9ab387 (patch) | |
tree | e9bfd4f3a44f6a49e60f1b8930a015c6772524ef /kernel | |
parent | d195412c35fe777811bd58ad43fba3aacc67e15c (diff) |
[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>
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/audit.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/kernel/audit.c b/kernel/audit.c index f9889ee77825..98106f6078b0 100644 --- a/kernel/audit.c +++ b/kernel/audit.c | |||
@@ -340,7 +340,7 @@ static int kauditd_thread(void *dummy) | |||
340 | { | 340 | { |
341 | struct sk_buff *skb; | 341 | struct sk_buff *skb; |
342 | 342 | ||
343 | while (1) { | 343 | while (!kthread_should_stop()) { |
344 | skb = skb_dequeue(&audit_skb_queue); | 344 | skb = skb_dequeue(&audit_skb_queue); |
345 | wake_up(&audit_backlog_wait); | 345 | wake_up(&audit_backlog_wait); |
346 | if (skb) { | 346 | if (skb) { |
@@ -369,6 +369,7 @@ static int kauditd_thread(void *dummy) | |||
369 | remove_wait_queue(&kauditd_wait, &wait); | 369 | remove_wait_queue(&kauditd_wait, &wait); |
370 | } | 370 | } |
371 | } | 371 | } |
372 | return 0; | ||
372 | } | 373 | } |
373 | 374 | ||
374 | int audit_send_list(void *_dest) | 375 | int audit_send_list(void *_dest) |