summaryrefslogtreecommitdiff
path: root/init
diff options
context:
space:
mode:
authorSumit Garg <sumit.garg@linaro.org>2021-02-25 17:22:38 -0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-03-04 11:38:46 +0100
commit13e83186c91a1e0990cbd2d4ef6b7d572bcc9277 (patch)
tree18bf04ccf75752aca76c21598ac4baadc072d69a /init
parentc51f98210ac685a686e53ad57e029ecebd1f99b6 (diff)
kgdb: fix to kill breakpoints on initmem after boot
commit d54ce6158e354f5358a547b96299ecd7f3725393 upstream. Currently breakpoints in kernel .init.text section are not handled correctly while allowing to remove them even after corresponding pages have been freed. Fix it via killing .init.text section breakpoints just prior to initmem pages being freed. Doug: "HW breakpoints aren't handled by this patch but it's probably not such a big deal". Link: https://lkml.kernel.org/r/20210224081652.587785-1-sumit.garg@linaro.org Signed-off-by: Sumit Garg <sumit.garg@linaro.org> Suggested-by: Doug Anderson <dianders@chromium.org> Acked-by: Doug Anderson <dianders@chromium.org> Acked-by: Daniel Thompson <daniel.thompson@linaro.org> Tested-by: Daniel Thompson <daniel.thompson@linaro.org> Cc: Masami Hiramatsu <mhiramat@kernel.org> Cc: Steven Rostedt (VMware) <rostedt@goodmis.org> Cc: Jason Wessel <jason.wessel@windriver.com> Cc: Peter Zijlstra <peterz@infradead.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'init')
-rw-r--r--init/main.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/init/main.c b/init/main.c
index 9d964511fe0c..d9d914111251 100644
--- a/init/main.c
+++ b/init/main.c
@@ -1417,6 +1417,7 @@ static int __ref kernel_init(void *unused)
async_synchronize_full();
kprobe_free_init_mem();
ftrace_free_init_mem();
+ kgdb_free_init_mem();
free_initmem();
mark_readonly();