lkml.org 
[lkml]   [2006]   [Oct]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] kauditd thread API fixes

Kill the "function should return a value" warning, and use the standard
mechanism for deciding when a thread should stop.

Signed-off-by: Jeff Garzik <jeff@garzik.org>

---

Given the security-sensitive nature of the audit function, _perhaps_ the
omission of kthread_should_stop() was intentional. If so, it at least
deserves a comment. But I think this is more correct.

diff --git a/kernel/audit.c b/kernel/audit.c
index f9889ee..b9146b1 100644
--- a/kernel/audit.c
+++ b/kernel/audit.c
@@ -340,7 +340,7 @@ static int kauditd_thread(void *dummy)
{
struct sk_buff *skb;

- while (1) {
+ do {
skb = skb_dequeue(&audit_skb_queue);
wake_up(&audit_backlog_wait);
if (skb) {
@@ -368,7 +368,9 @@ static int kauditd_thread(void *dummy)
__set_current_state(TASK_RUNNING);
remove_wait_queue(&kauditd_wait, &wait);
}
- }
+ } while (!kthread_should_stop());
+
+ return 0;
}

int audit_send_list(void *_dest)
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
\
 
 \ /
  Last update: 2006-10-01 14:33    [W:0.028 / U:0.536 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site