summaryrefslogtreecommitdiffstats
path: root/crypto/cts.c
diff options
context:
space:
mode:
authorPetr Mladek <pmladek@suse.cz>2014-06-04 16:11:28 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2014-06-04 16:54:16 -0700
commit0a581694ab7a5bc083d710df8a552a6a055b005f (patch)
treee0d7f4644f3c4cd2c0b69cafaeac2aa39c15c053 /crypto/cts.c
parentb300a4ea665f7fa44f015616ac1874deca891c5e (diff)
printk: split code for making free space in the log buffer
The check for free space in the log buffer always passes when "first_seq" and "next_seq" are equal. In theory, it might cause writing outside of the log buffer. Fortunately, the current usage looks safe because the used "text" and "dict" buffers are quite limited. See the second patch for more details. Anyway, it is better to be on the safe side and add a check. An easy solution is done in the 2nd patch and it is improved in the 4th patch. 5th patch fixes the computation of the printed message length. 1st and 3rd patches just do some code refactoring to make the other patches easier. This patch (of 5): There will be needed some fixes in the check for free space. They will be easier if the code is moved outside of the quite long log_store() function. This patch does not change the existing behavior. Signed-off-by: Petr Mladek <pmladek@suse.cz> Cc: Jan Kara <jack@suse.cz> Cc: Jiri Kosina <jkosina@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>
Diffstat (limited to 'crypto/cts.c')
0 files changed, 0 insertions, 0 deletions