Commit 3ec80029 authored by Wentao Wang's avatar Wentao Wang Committed by Greg Kroah-Hartman

Disable kgdboc failed by echo space to /sys/module/kgdboc/parameters/kgdboc

Echo "" to /sys/module/kgdboc/parameters/kgdboc will fail with "No such
device” error.

This is caused by function "configure_kgdboc" who init err to ENODEV
when the config is empty (legal input) the code go out with ENODEV
returned.

Fixes: 2dd45316 ("kgdboc: Fix restrict error")
Signed-off-by: default avatarWentao Wang <witallwang@gmail.com>
Cc: stable <stable@vger.kernel.org>
Acked-by: default avatarDaniel Thompson <daniel.thompson@linaro.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 898a737c
...@@ -148,8 +148,10 @@ static int configure_kgdboc(void) ...@@ -148,8 +148,10 @@ static int configure_kgdboc(void)
char *cptr = config; char *cptr = config;
struct console *cons; struct console *cons;
if (!strlen(config) || isspace(config[0])) if (!strlen(config) || isspace(config[0])) {
err = 0;
goto noconfig; goto noconfig;
}
kgdboc_io_ops.is_console = 0; kgdboc_io_ops.is_console = 0;
kgdb_tty_driver = NULL; kgdb_tty_driver = NULL;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment