lkml.org 
[lkml]   [2020]   [May]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] kdb: Make the internal env 'KDBFLAGS' undefinable
Date
'KDBFLAGS' is an internal variable of kdb, it is combined by 'KDBDEBUG'
and state flags. But the user can define an environment variable named
'KDBFLAGS' too, so let's make it undefinable to avoid confusion.

Signed-off-by: Wei Li <liwei391@huawei.com>
---
kernel/debug/kdb/kdb_main.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/kernel/debug/kdb/kdb_main.c b/kernel/debug/kdb/kdb_main.c
index 4fc43fb17127..d3d060136821 100644
--- a/kernel/debug/kdb/kdb_main.c
+++ b/kernel/debug/kdb/kdb_main.c
@@ -423,7 +423,8 @@ int kdb_set(int argc, const char **argv)
| (debugflags << KDB_DEBUG_FLAG_SHIFT);

return 0;
- }
+ } else if (strcmp(argv[1], "KDBFLAGS") == 0)
+ return KDB_NOPERM;

/*
* Tokenizer squashed the '=' sign. argv[1] is variable
--
2.17.1
\
 
 \ /
  Last update: 2020-05-11 04:18    [W:0.033 / U:0.052 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site