Skip to contentSkip to conversation

+ audit-fix-endless-wait-in-audit_log_start.patch added to -mm tree

PATCH [email protected] 1 participant 1 message Sep 19, 2013 Audit

lore
Share & tools
lore
#0 lore raw

Subject: + audit-fix-endless-wait-in-audit_log_start.patch added to -mm tree
To: [email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected]
From: [email protected]
Date: Thu, 19 Sep 2013 13:58:19 -0700

The patch titled
Subject: audit: fix endless wait in audit_log_start()
has been added to the -mm tree. Its filename is
audit-fix-endless-wait-in-audit_log_start.patch

This patch should soon appear at
http://ozlabs.org/~akpm/mmots/broken-out/audit-fix-endless-wait-in-audit_log_start.patch
and later at
http://ozlabs.org/~akpm/mmotm/broken-out/audit-fix-endless-wait-in-audit_log_start.patch

Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/SubmitChecklist when testing your code ***

The -mm tree is included into linux-next and is updated there every 3-4 working days

------------------------------------------------------
From: Konstantin Khlebnikov <[email protected]>
Subject: audit: fix endless wait in audit_log_start()

After 829199197a43 ("kernel/audit.c: avoid negative sleep durations") audit emitters will block forever if userspace daemon cannot handle backlog. After the timeout waiting loop turns into busy loop and runs until daemon dies or returns back to work. This is a minimal patch for that bug.

Cc Luiz Capitulino <[email protected]>
Cc Richard Guy Briggs <[email protected]>
Cc Eric Paris <[email protected]>
Cc Chuck Anderson <[email protected]>
Cc Dan Duval <[email protected]>
Cc Dave Kleikamp <[email protected]>

---

 kernel/audit.c |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
kernel/audit.c renamed from kernel/audit.c~audit-fix-endless-wait-in-audit_log_start +3 -2
diff -puN kernel/audit.c~audit-fix-endless-wait-in-audit_log_start 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

_

Patches currently in -mm which might be from [email protected] are

origin.patch
audit-fix-endless-wait-in-audit_log_start.patch drm-fb-helper-dont-sleep-for-screen-unblank-when-an-oopps-is-in-progress.patch swap-add-a-simple-detector-for-inappropriate-swapin-readahead.patch