History

audit: wait_for_auditd() should use TASK_UNINTERRUPTIBLE

audit_log_start() does wait_for_auditd() in a loop until audit_backlog_wait_time passes or audit_skb_queue has a room. If signal_pending() is true this becomes a busy-wait loop, schedule() in TASK_INTERRUPTIBLE won't block. Thanks to Guy for fully investigating and explaining the problem. (akpm: that'll cause the system to lock up on a non-preemptible uniprocessor kernel) (Guy: "Our customer was in fact running a uniprocessor machine, and they reported a system hang.")

Oleg Nesterov committed 13 years ago

Commit f000cfd1 parent ebf8d6c1 file · +1 −1Browse files

Unified · Split

kernel/audit.c+1−1
@@ -1056,7 +1056,7 @@ static inline void audit_get_stamp(struct audit_context *ctx, · 1055 unmodified lines
10561056 static void wait_for_auditd(unsigned long sleep_time)
10571057 {
10581058 DECLARE_WAITQUEUE(wait, current);
1059− set_current_state(TASK_INTERRUPTIBLE);
1059+ set_current_state(TASK_UNINTERRUPTIBLE);
10601060 add_wait_queue(&audit_backlog_wait, &wait);
10611061
10621062 if (audit_backlog_limit &&