Gitweb:
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=cf3680b90c7842cf91ed857ac4528f4e057da366
Commit: cf3680b90c7842cf91ed857ac4528f4e057da366
Parent: bfa274e2436fc7ef72ef51c878083647f1cfd429
Author: Tejun Heo <[EMAIL PROTECTED]>
AuthorDate: Thu Feb 14 10:32:07 2008 +0900
Committer: Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Tue Feb 26 07:42:37 2008 -0800
printk: fix possible printk overrun
printk recursion detection prepends message to printk_buf and offsets
printk_buf when actual message is printed but it forgets to trim buffer
length accordingly. This can result in overrun in extreme cases. Fix it.
[ [EMAIL PROTECTED]:
bug was introduced by me via:
commit 32a76006683f7b28ae3cc491da37716e002f198e
Author: Ingo Molnar <[EMAIL PROTECTED]>
Date: Fri Jan 25 21:07:58 2008 +0100
printk: make printk more robust by not allowing recursion
]
Signed-off-by: Tejun Heo <[EMAIL PROTECTED]>
Signed-off-by: Ingo Molnar <[EMAIL PROTECTED]>
Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
---
kernel/printk.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/kernel/printk.c b/kernel/printk.c
index bee3610..9adc2a4 100644
--- a/kernel/printk.c
+++ b/kernel/printk.c
@@ -666,7 +666,7 @@ asmlinkage int vprintk(const char *fmt, va_list args)
}
/* Emit the output into the temporary buffer */
printed_len += vscnprintf(printk_buf + printed_len,
- sizeof(printk_buf), fmt, args);
+ sizeof(printk_buf) - printed_len, fmt, args);
/*
* Copy the output into log_buf. If the caller didn't provide
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html