1 From 3ec8002951ea173e24b466df1ea98c56b7920e63 Mon Sep 17 00:00:00 2001
2 From: Wentao Wang <witallwang@gmail.com>
3 Date: Wed, 20 Mar 2019 15:30:39 +0000
4 Subject: Disable kgdboc failed by echo space to /sys/module/kgdboc/parameters/kgdboc
6 Content-Type: text/plain; charset=UTF-8
7 Content-Transfer-Encoding: 8bit
9 From: Wentao Wang <witallwang@gmail.com>
11 commit 3ec8002951ea173e24b466df1ea98c56b7920e63 upstream.
13 Echo "" to /sys/module/kgdboc/parameters/kgdboc will fail with "No such
16 This is caused by function "configure_kgdboc" who init err to ENODEV
17 when the config is empty (legal input) the code go out with ENODEV
20 Fixes: 2dd453168643 ("kgdboc: Fix restrict error")
21 Signed-off-by: Wentao Wang <witallwang@gmail.com>
22 Cc: stable <stable@vger.kernel.org>
23 Acked-by: Daniel Thompson <daniel.thompson@linaro.org>
24 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
27 drivers/tty/serial/kgdboc.c | 4 +++-
28 1 file changed, 3 insertions(+), 1 deletion(-)
30 --- a/drivers/tty/serial/kgdboc.c
31 +++ b/drivers/tty/serial/kgdboc.c
32 @@ -148,8 +148,10 @@ static int configure_kgdboc(void)
36 - if (!strlen(config) || isspace(config[0]))
37 + if (!strlen(config) || isspace(config[0])) {
42 kgdboc_io_ops.is_console = 0;
43 kgdb_tty_driver = NULL;