Skip to content

Commit

Permalink
[PATCH] Add try_to_freeze to kauditd
Browse files Browse the repository at this point in the history
kauditd was causing suspends to fail because it refused to freeze.  Adding
a try_to_freeze() to its sleep loop solves the issue.

Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
Acked-by: Pavel Machek <pavel@suse.cz>
Cc: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
  • Loading branch information
Pierre Ossman authored and Linus Torvalds committed Dec 12, 2005
1 parent bf001b2 commit 7a4ae74
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion kernel/audit.c
Original file line number Diff line number Diff line change
Expand Up @@ -291,8 +291,10 @@ int kauditd_thread(void *dummy)
set_current_state(TASK_INTERRUPTIBLE);
add_wait_queue(&kauditd_wait, &wait);

if (!skb_queue_len(&audit_skb_queue))
if (!skb_queue_len(&audit_skb_queue)) {
try_to_freeze();
schedule();
}

__set_current_state(TASK_RUNNING);
remove_wait_queue(&kauditd_wait, &wait);
Expand Down

0 comments on commit 7a4ae74

Please sign in to comment.