From f6c672dade320d03c23756927cd4239f9bb08f59 Mon Sep 17 00:00:00 2001 From: Kris Van Hees Date: Mon, 18 Jan 2016 04:19:53 -0500 Subject: [PATCH] dtrace: ensure that PID 0 has a psinfo struct Test builtinvar/tst.psinfo.d lists a large amount of memory access errors trying to read from non-existant psinfo information for PID 0. This commit enusres that prior to dtrace doing any work, PID 0 (the init_task) has a psinfo structure associated with it. Orabug: 22561297 Signed-off-by: Kris Van Hees Acked-by: Nick Alcock --- kernel/dtrace/dtrace_os.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/kernel/dtrace/dtrace_os.c b/kernel/dtrace/dtrace_os.c index cb07fb10d92f..ff94fd9b4420 100644 --- a/kernel/dtrace/dtrace_os.c +++ b/kernel/dtrace/dtrace_os.c @@ -85,6 +85,11 @@ void dtrace_os_init(void) SLAB_HWCACHE_ALIGN|SLAB_PANIC|SLAB_NOTRACK, NULL); + /* + * We need to set up a psinfo structure for PID 0 (swapper). + */ + dtrace_psinfo_alloc(&init_task); + dtrace_sdt_init(); dtrace_sdt_register(dtrace_kmod); } -- 2.50.1