summaryrefslogtreecommitdiffstats
path: root/mm/Kconfig.debug
diff options
context:
space:
mode:
authorRusty Russell <rusty@rustcorp.com.au>2015-01-20 09:07:05 +1030
committerRusty Russell <rusty@rustcorp.com.au>2015-01-20 11:38:34 +1030
commitc749637909eea5d4090c6f50b89c2c20b534a280 (patch)
tree5260d20a4494fb9507cb947e2148085545e4c133 /mm/Kconfig.debug
parentbe1f221c0445a4157d177197c236f888d3581914 (diff)
downloadblackbird-op-linux-c749637909eea5d4090c6f50b89c2c20b534a280.tar.gz
blackbird-op-linux-c749637909eea5d4090c6f50b89c2c20b534a280.zip
module: fix race in kallsyms resolution during module load success.
The kallsyms routines (module_symbol_name, lookup_module_* etc) disable preemption to walk the modules rather than taking the module_mutex: this is because they are used for symbol resolution during oopses. This works because there are synchronize_sched() and synchronize_rcu() in the unload and failure paths. However, there's one case which doesn't have that: the normal case where module loading succeeds, and we free the init section. We don't want a synchronize_rcu() there, because it would slow down module loading: this bug was introduced in 2009 to speed module loading in the first place. Thus, we want to do the free in an RCU callback. We do this in the simplest possible way by allocating a new rcu_head: if we put it in the module structure we'd have to worry about that getting freed. Reported-by: Rui Xiang <rui.xiang@huawei.com> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Diffstat (limited to 'mm/Kconfig.debug')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud