Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935137AbaDJDXB (ORCPT ); Wed, 9 Apr 2014 23:23:01 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:40804 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934320AbaDJDVc (ORCPT ); Wed, 9 Apr 2014 23:21:32 -0400 From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Oleg Nesterov , Guy Streeter , Eric Paris , Al Viro , Andrew Morton , Linus Torvalds , Ben Hutchings , Qiang Huang , Li Zefan , Jianguo Wu Subject: [PATCH 3.4 003/134] audit: wait_for_auditd() should use TASK_UNINTERRUPTIBLE Date: Wed, 9 Apr 2014 20:21:59 -0700 Message-Id: <20140410032300.079283146@linuxfoundation.org> X-Mailer: git-send-email 1.9.0 In-Reply-To: <20140410032259.587501440@linuxfoundation.org> References: <20140410032259.587501440@linuxfoundation.org> User-Agent: quilt/0.60-1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 3.4-stable review patch. If anyone has any objections, please let me know. ------------------ From: Oleg Nesterov commit f000cfdde5de4fc15dead5ccf524359c07eadf2b upstream. 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.") Signed-off-by: Oleg Nesterov Reported-by: Guy Streeter Cc: Eric Paris Cc: Al Viro Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [bwh: Backported to 3.2: adjust context, indentation] Signed-off-by: Ben Hutchings Cc: Qiang Huang Cc: Li Zefan Cc: Jianguo Wu Signed-off-by: Greg Kroah-Hartman --- kernel/audit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/kernel/audit.c +++ b/kernel/audit.c @@ -1168,7 +1168,7 @@ struct audit_buffer *audit_log_start(str /* Wait for auditd to drain the queue a little */ DECLARE_WAITQUEUE(wait, current); - set_current_state(TASK_INTERRUPTIBLE); + set_current_state(TASK_UNINTERRUPTIBLE); add_wait_queue(&audit_backlog_wait, &wait); if (audit_backlog_limit && -- 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/