Skip to content

Commit

Permalink
modules: Enabled dynamic debugging for staging modules
Browse files Browse the repository at this point in the history
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 <[email protected]>
Acked-by: Jason Baron <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
  • Loading branch information
BroadcomOpenSource authored and gregkh committed Apr 25, 2011
1 parent cb63e4c commit 7816c45
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions kernel/module.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 7816c45

Please sign in to comment.