From: Kris Van Hees Date: Wed, 11 Jan 2012 06:18:41 +0000 (-0500) Subject: Ensure that the die notifier hook is installed whenever DTrace is enabled, X-Git-Tag: v4.1.12-111.0.20170907_2225~3^2~3^2~203 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=50dfc0a945a1b229ccadae3a1c658c54273a724f;p=users%2Fjedix%2Flinux-maple.git Ensure that the die notifier hook is installed whenever DTrace is enabled, since page fault and general protection fault handling depends on it, and that is needed for safe memory access support in DTrace. Work around an apparent bug in Xen where an invalid opcode fault is delivered as a general protection failure instead. Signed-off-by: Kris Van Hees --- diff --git a/dtrace/dtrace_dev.c b/dtrace/dtrace_dev.c index ab1aafa100fe9..acb8af843dd28 100644 --- a/dtrace/dtrace_dev.c +++ b/dtrace/dtrace_dev.c @@ -1299,6 +1299,7 @@ int dtrace_dev_init(void) * the first provider causing the core to be loaded. */ #endif + dtrace_enable(); mutex_unlock(&dtrace_provider_lock); mutex_unlock(&dtrace_lock); @@ -1308,6 +1309,8 @@ int dtrace_dev_init(void) void dtrace_dev_exit(void) { + dtrace_disable(); + kmem_cache_destroy(dtrace_state_cache); misc_deregister(&dtrace_dev);