Patch "printk: fix parsing of "brl=" option" has been added to the 4.4-stable tree
Subsystems (2)
This is a note to let you know that I've just added the patch titled
printk: fix parsing of "brl=" option
to the 4.4-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
printk-fix-parsing-of-brl-option.patch
and it can be found in the queue-4.4 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
Quoted 1 line
From
ae6c33ba6e37eea3012fe2640b22400ef3f2d0f3Mon Sep 17 00:00:00 2001
From: Nicolas Iooss <[email protected]>
Date: Thu, 25 Aug 2016 15:17:00 -0700
Subject: printk: fix parsing of "brl=" option
From: Nicolas Iooss <[email protected]>
commit ae6c33ba6e37eea3012fe2640b22400ef3f2d0f3 upstream.
Commit bbeddf52adc1 ("printk: move braille console support into separate braille.[ch] files") moved the parsing of braille-related options into _braille_console_setup(), changing the type of variable str from char* to char**. In this commit, memcmp(str, "brl,", 4) was correctly updated to memcmp(*str, "brl,", 4) but not memcmp(str, "brl=", 4).
Update the code to make "brl=" option work again and replace memcmp() with strncmp() to make the compiler able to detect such an issue.
--- kernel/printk/braille.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
kernel/printk/braille.c +2 -2
@@ -9,10 +9,10 @@char *_braille_console_setup (char **str,char **brl_options) { -if (!memcmp (*str,"brl," ,4 )) { +if (!strncmp (*str,"brl," ,4 )) { *brl_options ="" ; *str +=4 ; - }else if (!memcmp (str,"brl=" ,4 )) { + }else if (!strncmp (*str,"brl=" ,4 )) { *brl_options = *str +4 ; *str =strchr (*brl_options,',' );if (!*str)
Patches currently in stable-queue which might be from [email protected] are
queue-4.4/printk-fix-parsing-of-brl-option.patch