* [PATCH] Disable kgdboc failed by echo space to /sys/module/kgdboc/parameters/kgdboc
@ 2019-03-08 1:54 王 文涛
2019-03-19 14:23 ` gregkh
0 siblings, 1 reply; 4+ messages in thread
From: 王 文涛 @ 2019-03-08 1:54 UTC (permalink / raw)
To: jason.wessel, daniel.thompson, gregkh, jslaby
Cc: kgdb-bugreport, linux-serial
From 66d39c0de0abd45ddca7aa8fc08632b01d669d7b Mon Sep 17 00:00:00 2001
From: Wentao Wang <“witallwang@gmail.com”>
Date: Mon, 4 Mar 2019 21:58:33 +0800
Subject: [PATCH] Disable kgdboc failed by echo space to
/sys/module/kgdboc/parameters/kgdboc
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Echo "" to /sys/module/kgdboc/parameters/kgdboc will fail with write
error: No such device
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: 2dd453168643d ("kgdboc: Fix restrict error")
Signed-off-by: Wentao Wang <“witallwang@gmail.com”>
---
drivers/tty/serial/kgdboc.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/tty/serial/kgdboc.c b/drivers/tty/serial/kgdboc.c
index 6fb312e..bfe5e9e 100644
--- a/drivers/tty/serial/kgdboc.c
+++ b/drivers/tty/serial/kgdboc.c
@@ -148,8 +148,10 @@ static int configure_kgdboc(void)
char *cptr = config;
struct console *cons;
- if (!strlen(config) || isspace(config[0]))
+ if (!strlen(config) || isspace(config[0])) {
+ err = 0;
goto noconfig;
+ }
kgdboc_io_ops.is_console = 0;
kgdb_tty_driver = NULL;
--
2.7.4
_______________________________________________
Kgdb-bugreport mailing list
Kgdb-bugreport@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kgdb-bugreport
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] Disable kgdboc failed by echo space to /sys/module/kgdboc/parameters/kgdboc
2019-03-08 1:54 [PATCH] Disable kgdboc failed by echo space to /sys/module/kgdboc/parameters/kgdboc 王 文涛
@ 2019-03-19 14:23 ` gregkh
2019-03-20 15:30 ` 王 文涛
0 siblings, 1 reply; 4+ messages in thread
From: gregkh @ 2019-03-19 14:23 UTC (permalink / raw)
To: 王 文涛
Cc: kgdb-bugreport, daniel.thompson, jslaby, linux-serial, jason.wessel
On Fri, Mar 08, 2019 at 01:54:02AM +0000, 王 文涛 wrote:
> From 66d39c0de0abd45ddca7aa8fc08632b01d669d7b Mon Sep 17 00:00:00 2001
> From: Wentao Wang <“witallwang@gmail.com”>
> Date: Mon, 4 Mar 2019 21:58:33 +0800
> Subject: [PATCH] Disable kgdboc failed by echo space to
> /sys/module/kgdboc/parameters/kgdboc
> MIME-Version: 1.0
> Content-Type: text/plain; charset=UTF-8
> Content-Transfer-Encoding: 8bit
Why is this all in your patch itself? It's also line-wrapped :(
Please just send the patch in a "clean" format, or use git send-email to
send it out.
>
> Echo "" to /sys/module/kgdboc/parameters/kgdboc will fail with write
> error: No such device
> 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: 2dd453168643d ("kgdboc: Fix restrict error")
>
> Signed-off-by: Wentao Wang <“witallwang@gmail.com”>
No need for "" for your email address.
Can you please fix this up and resend so I can apply the patch?
thanks,
greg k-h
_______________________________________________
Kgdb-bugreport mailing list
Kgdb-bugreport@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kgdb-bugreport
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH] Disable kgdboc failed by echo space to /sys/module/kgdboc/parameters/kgdboc
2019-03-19 14:23 ` gregkh
@ 2019-03-20 15:30 ` 王 文涛
2019-03-21 10:33 ` Daniel Thompson
0 siblings, 1 reply; 4+ messages in thread
From: 王 文涛 @ 2019-03-20 15:30 UTC (permalink / raw)
To: gregkh
Cc: kgdb-bugreport, daniel.thompson, jslaby, linux-serial, jason.wessel
From: Wentao Wang <witallwang@gmail.com>
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: 2dd453168643d ("kgdboc: Fix restrict error")
Signed-off-by: Wentao Wang <witallwang@gmail.com>
---
drivers/tty/serial/kgdboc.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/tty/serial/kgdboc.c b/drivers/tty/serial/kgdboc.c
index 6fb312e..bfe5e9e 100644
--- a/drivers/tty/serial/kgdboc.c
+++ b/drivers/tty/serial/kgdboc.c
@@ -148,8 +148,10 @@ static int configure_kgdboc(void)
char *cptr = config;
struct console *cons;
- if (!strlen(config) || isspace(config[0]))
+ if (!strlen(config) || isspace(config[0])) {
+ err = 0;
goto noconfig;
+ }
kgdboc_io_ops.is_console = 0;
kgdb_tty_driver = NULL;
--
2.7.4
_______________________________________________
Kgdb-bugreport mailing list
Kgdb-bugreport@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kgdb-bugreport
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] Disable kgdboc failed by echo space to /sys/module/kgdboc/parameters/kgdboc
2019-03-20 15:30 ` 王 文涛
@ 2019-03-21 10:33 ` Daniel Thompson
0 siblings, 0 replies; 4+ messages in thread
From: Daniel Thompson @ 2019-03-21 10:33 UTC (permalink / raw)
To: 王 文涛
Cc: kgdb-bugreport, gregkh, jslaby, linux-serial, jason.wessel
On Wed, Mar 20, 2019 at 03:30:39PM +0000, 王 文涛 wrote:
> From: Wentao Wang <witallwang@gmail.com>
>
> 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: 2dd453168643d ("kgdboc: Fix restrict error")
>
> Signed-off-by: Wentao Wang <witallwang@gmail.com>
Acked-by: Daniel Thompson <daniel.thompson@linaro.org>
Thanks!
Daniel.
> ---
> drivers/tty/serial/kgdboc.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/tty/serial/kgdboc.c b/drivers/tty/serial/kgdboc.c
> index 6fb312e..bfe5e9e 100644
> --- a/drivers/tty/serial/kgdboc.c
> +++ b/drivers/tty/serial/kgdboc.c
> @@ -148,8 +148,10 @@ static int configure_kgdboc(void)
> char *cptr = config;
> struct console *cons;
>
> - if (!strlen(config) || isspace(config[0]))
> + if (!strlen(config) || isspace(config[0])) {
> + err = 0;
> goto noconfig;
> + }
>
> kgdboc_io_ops.is_console = 0;
> kgdb_tty_driver = NULL;
> --
> 2.7.4
>
_______________________________________________
Kgdb-bugreport mailing list
Kgdb-bugreport@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kgdb-bugreport
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2019-03-21 10:33 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-08 1:54 [PATCH] Disable kgdboc failed by echo space to /sys/module/kgdboc/parameters/kgdboc 王 文涛
2019-03-19 14:23 ` gregkh
2019-03-20 15:30 ` 王 文涛
2019-03-21 10:33 ` Daniel Thompson
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.