[merged] printk-add-comment-about-tricky-check-for-text-buffer-size.patch removed from -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Subject: [merged] printk-add-comment-about-tricky-check-for-text-buffer-size.patch removed from -mm tree
To: pmladek@xxxxxxx,fweisbec@xxxxxxxxx,jack@xxxxxxx,kay@xxxxxxxx,mhocko@xxxxxxx,rostedt@xxxxxxxxxxx,mm-commits@xxxxxxxxxxxxxxx
From: akpm@xxxxxxxxxxxxxxxxxxxx
Date: Fri, 04 Apr 2014 12:32:50 -0700


The patch titled
     Subject: printk: add comment about tricky check for text buffer size
has been removed from the -mm tree.  Its filename was
     printk-add-comment-about-tricky-check-for-text-buffer-size.patch

This patch was dropped because it was merged into mainline or a subsystem tree

------------------------------------------------------
From: Petr Mladek <pmladek@xxxxxxx>
Subject: printk: add comment about tricky check for text buffer size

There is no check for potential "text_len" overflow.  It is not needed
because only valid level is detected.  It took me some time to understand
why.  It would deserve a comment ;-)

Signed-off-by: Petr Mladek <pmladek@xxxxxxx>
Cc: Steven Rostedt <rostedt@xxxxxxxxxxx>
Cc: Frederic Weisbecker <fweisbec@xxxxxxxxx>
Cc: Jan Kara <jack@xxxxxxx>
Cc: Michal Hocko <mhocko@xxxxxxx>
Cc: Kay Sievers <kay@xxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 kernel/printk/printk.c |    5 +++++
 1 file changed, 5 insertions(+)

diff -puN kernel/printk/printk.c~printk-add-comment-about-tricky-check-for-text-buffer-size kernel/printk/printk.c
--- a/kernel/printk/printk.c~printk-add-comment-about-tricky-check-for-text-buffer-size
+++ a/kernel/printk/printk.c
@@ -1561,6 +1561,11 @@ asmlinkage int vprintk_emit(int facility
 			case 'd':	/* KERN_DEFAULT */
 				lflags |= LOG_PREFIX;
 			}
+			/*
+			 * No need to check length here because vscnprintf
+			 * put '\0' at the end of the string. Only valid and
+			 * newly printed level is detected.
+			 */
 			text_len -= end_of_header - text;
 			text = (char *)end_of_header;
 		}
_

Patches currently in -mm which might be from pmladek@xxxxxxx are

origin.patch
linux-next.patch

--
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux