]> git.baikalelectronics.ru Git - kernel.git/commit
printk: add comment about tricky check for text buffer size
authorPetr Mladek <pmladek@suse.cz>
Thu, 3 Apr 2014 21:48:41 +0000 (14:48 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 3 Apr 2014 23:21:07 +0000 (16:21 -0700)
commit839037f9bbbc050f3f0427781ba4b5479f9d1c36
tree94fe60e04065bb06c1c83c68b8371dedc113cfc3
parent86e3d5eba544d1073bf925b540f76c9cf8ab93d7
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@suse.cz>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Jan Kara <jack@suse.cz>
Cc: Michal Hocko <mhocko@suse.cz>
Cc: Kay Sievers <kay@vrfy.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
kernel/printk/printk.c