diff options
author | Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com> | 2014-11-09 17:58:29 -0500 |
---|---|---|
committer | Rusty Russell <rusty@rustcorp.com.au> | 2014-11-11 01:37:46 -0500 |
commit | 0286b5ea125e58b4797747f688949c05394412e8 (patch) | |
tree | def974e29b25f8a7a00da7b39f5b18bac93af98d /kernel | |
parent | 461e34aed0550fee706a9a28fb453830b5079ea0 (diff) |
lib/bug: Use RCU list ops for module_bug_list
Actually since module_bug_list should be used in BUG context,
we may not need this. But for someone who want to use this
from normal context, this makes module_bug_list an RCU list.
Signed-off-by: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/module.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/kernel/module.c b/kernel/module.c index bed608b8c8a6..d596a306b0a1 100644 --- a/kernel/module.c +++ b/kernel/module.c | |||
@@ -1850,9 +1850,10 @@ static void free_module(struct module *mod) | |||
1850 | mutex_lock(&module_mutex); | 1850 | mutex_lock(&module_mutex); |
1851 | /* Unlink carefully: kallsyms could be walking list. */ | 1851 | /* Unlink carefully: kallsyms could be walking list. */ |
1852 | list_del_rcu(&mod->list); | 1852 | list_del_rcu(&mod->list); |
1853 | /* Wait for RCU synchronizing before releasing mod->list. */ | 1853 | /* Remove this module from bug list, this uses list_del_rcu */ |
1854 | synchronize_rcu(); | ||
1855 | module_bug_cleanup(mod); | 1854 | module_bug_cleanup(mod); |
1855 | /* Wait for RCU synchronizing before releasing mod->list and buglist. */ | ||
1856 | synchronize_rcu(); | ||
1856 | mutex_unlock(&module_mutex); | 1857 | mutex_unlock(&module_mutex); |
1857 | 1858 | ||
1858 | /* This may be NULL, but that's OK */ | 1859 | /* This may be NULL, but that's OK */ |