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.")
Unified · Split
| @@ -1056,7 +1056,7 @@ static inline void audit_get_stamp(struct audit_context *ctx, · 1055 unmodified lines | ||
| 1056 | 1056 | static void wait_for_auditd(unsigned long sleep_time) |
| 1057 | 1057 | { |
| 1058 | 1058 | DECLARE_WAITQUEUE(wait, current); |
| 1059 | − set_current_state(TASK_INTERRUPTIBLE); | |
| 1059 | + set_current_state(TASK_UNINTERRUPTIBLE); | |
| 1060 | 1060 | add_wait_queue(&audit_backlog_wait, &wait); |
| 1061 | 1061 | |
| 1062 | 1062 | if (audit_backlog_limit && |