Commit 0d9b9c16 authored by Linus Torvalds's avatar Linus Torvalds

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()
parents 5b3b5921 c064a0de
...@@ -248,11 +248,12 @@ static int klp_find_external_symbol(struct module *pmod, const char *name, ...@@ -248,11 +248,12 @@ static int klp_find_external_symbol(struct module *pmod, const char *name,
/* first, check if it's an exported symbol */ /* first, check if it's an exported symbol */
preempt_disable(); preempt_disable();
sym = find_symbol(name, NULL, NULL, true, true); sym = find_symbol(name, NULL, NULL, true, true);
preempt_enable();
if (sym) { if (sym) {
*addr = sym->value; *addr = sym->value;
preempt_enable();
return 0; return 0;
} }
preempt_enable();
/* otherwise check if it's in another .o within the patch module */ /* otherwise check if it's in another .o within the patch module */
return klp_find_object_symbol(pmod->name, name, addr); return klp_find_object_symbol(pmod->name, name, addr);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment