]> 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)
commita7e4b3a984a476924851698d84d0799f34b6835c
tree94fe60e04065bb06c1c83c68b8371dedc113cfc3
parent269fb237c90092ddb0bec9b0a09add00846938db
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