]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
Ensure that the die notifier hook is installed whenever DTrace is enabled,
authorKris Van Hees <kris.van.hees@oracle.com>
Wed, 11 Jan 2012 06:18:41 +0000 (01:18 -0500)
committerKris Van Hees <kris.van.hees@oracle.com>
Wed, 11 Jan 2012 06:21:16 +0000 (01:21 -0500)
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 <kris.van.hees@oracle.com>
dtrace/dtrace_dev.c

index ab1aafa100fe9292bd08441f29bb168db52b207e..acb8af843dd28d290bb5817dc0a6065ccdba27a8 100644 (file)
@@ -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);