diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2015-03-06 13:47:56 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2015-03-06 13:47:56 -0800 |
commit | 0d9b9c1674fa7f86175a41805061908022e394b8 (patch) | |
tree | 5846b107c5c10932e59d4dbf92456c69af856c70 /kernel | |
parent | 5b3b5921bad8617ff0b3fbfc2a2c6617f2525fd9 (diff) | |
parent | c064a0de1bfb07c34a3798822c7e1636eea866e8 (diff) | |
download | linux-stable-0d9b9c1674fa7f86175a41805061908022e394b8.tar.gz linux-stable-0d9b9c1674fa7f86175a41805061908022e394b8.tar.bz2 linux-stable-0d9b9c1674fa7f86175a41805061908022e394b8.zip |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/livepatching
Pull livepatching fix from Jiri Kosina:
"Fix an RCU unlock misplacement in live patching infrastructure, from
Peter Zijlstra"
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/livepatching:
livepatch: fix RCU usage in klp_find_external_symbol()
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/livepatch/core.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/kernel/livepatch/core.c b/kernel/livepatch/core.c index 782172f073c5..01ca08804f51 100644 --- a/kernel/livepatch/core.c +++ b/kernel/livepatch/core.c @@ -248,11 +248,12 @@ static int klp_find_external_symbol(struct module *pmod, const char *name, /* first, check if it's an exported symbol */ preempt_disable(); sym = find_symbol(name, NULL, NULL, true, true); - preempt_enable(); if (sym) { *addr = sym->value; + preempt_enable(); return 0; } + preempt_enable(); /* otherwise check if it's in another .o within the patch module */ return klp_find_object_symbol(pmod->name, name, addr); |