From: Kris Van Hees Date: Mon, 18 Jan 2016 09:19:53 +0000 (-0500) Subject: dtrace: ensure that PID 0 has a psinfo struct X-Git-Tag: v4.1.12-92~204^2~2 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=f6c672dade320d03c23756927cd4239f9bb08f59;p=users%2Fjedix%2Flinux-maple.git 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 --- 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); }