[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20130929191605.721016878@linuxfoundation.org>
Date: Sun, 29 Sep 2013 12:27:14 -0700
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: linux-kernel@...r.kernel.org
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
stable@...r.kernel.org,
Konstantin Khlebnikov <khlebnikov@...nvz.org>,
Luiz Capitulino <lcapitulino@...hat.com>,
Richard Guy Briggs <rgb@...hat.com>,
Eric Paris <eparis@...hat.com>,
Chuck Anderson <chuck.anderson@...cle.com>,
Dan Duval <dan.duval@...cle.com>,
Dave Kleikamp <dave.kleikamp@...cle.com>,
Andrew Morton <akpm@...ux-foundation.org>,
Linus Torvalds <torvalds@...ux-foundation.org>,
Jonghwan Choi <jhbird.choi@...sung.com>
Subject: [ 40/49] audit: fix endless wait in audit_log_start()
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Konstantin Khlebnikov <khlebnikov@...nvz.org>
commit 8ac1c8d5deba65513b6a82c35e89e73996c8e0d6 upstream.
After commit 829199197a43 ("kernel/audit.c: avoid negative sleep
durations") audit emitters will block forever if userspace daemon cannot
handle backlog.
After the timeout the waiting loop turns into busy loop and runs until
daemon dies or returns back to work. This is a minimal patch for that
bug.
Signed-off-by: Konstantin Khlebnikov <khlebnikov@...nvz.org>
Cc: Luiz Capitulino <lcapitulino@...hat.com>
Cc: Richard Guy Briggs <rgb@...hat.com>
Cc: Eric Paris <eparis@...hat.com>
Cc: Chuck Anderson <chuck.anderson@...cle.com>
Cc: Dan Duval <dan.duval@...cle.com>
Cc: Dave Kleikamp <dave.kleikamp@...cle.com>
Signed-off-by: Andrew Morton <akpm@...ux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: Jonghwan Choi <jhbird.choi@...sung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
---
kernel/audit.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
--- a/kernel/audit.c
+++ b/kernel/audit.c
@@ -1117,9 +1117,10 @@ struct audit_buffer *audit_log_start(str
sleep_time = timeout_start + audit_backlog_wait_time -
jiffies;
- if ((long)sleep_time > 0)
+ if ((long)sleep_time > 0) {
wait_for_auditd(sleep_time);
- continue;
+ continue;
+ }
}
if (audit_rate_check() && printk_ratelimit())
printk(KERN_WARNING
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists