modules: Enabled dynamic debugging for staging modules
authorRoland Vossen <rvossen@broadcom.com>
Thu, 7 Apr 2011 09:20:58 +0000 (11:20 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 25 Apr 2011 23:45:22 +0000 (16:45 -0700)
Driver modules from the staging directory are marked 'tainted'
by module.c. Subsequently, tainted modules are denied dynamic
debugging. This is unwanted behavior, since staging modules should
be able to use the dynamic debugging mechanism.

Please merge this also into the staging-linus branch.

Signed-off-by: Roland Vossen <rvossen@broadcom.com>
Acked-by: Jason Baron <jbaron@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
kernel/module.c

index d5938a5c19c47516499ef289b2087620783e23df..4d5c16aae7459306f68c9b08720abe38820b4552 100644 (file)
@@ -2790,7 +2790,7 @@ static struct module *load_module(void __user *umod,
        }
 
        /* This has to be done once we're sure module name is unique. */
-       if (!mod->taints)
+       if (!mod->taints || mod->taints == (1U<<TAINT_CRAP))
                dynamic_debug_setup(info.debug, info.num_debug);
 
        /* Find duplicate symbols */
@@ -2827,7 +2827,7 @@ static struct module *load_module(void __user *umod,
        module_bug_cleanup(mod);
 
  ddebug:
-       if (!mod->taints)
+       if (!mod->taints || mod->taints == (1U<<TAINT_CRAP))
                dynamic_debug_remove(info.debug);
  unlock:
        mutex_unlock(&module_mutex);
This page took 0.026204 seconds and 5 git commands to generate.