Commit 0d9b9c1674fa7f86175a41805061908022e394b8
Exists in
ti-lsk-linux-4.1.y
and in
10 other branches
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()
Showing 1 changed file Side-by-side Diff
kernel/livepatch/core.c
... | ... | @@ -248,11 +248,12 @@ |
248 | 248 | /* first, check if it's an exported symbol */ |
249 | 249 | preempt_disable(); |
250 | 250 | sym = find_symbol(name, NULL, NULL, true, true); |
251 | - preempt_enable(); | |
252 | 251 | if (sym) { |
253 | 252 | *addr = sym->value; |
253 | + preempt_enable(); | |
254 | 254 | return 0; |
255 | 255 | } |
256 | + preempt_enable(); | |
256 | 257 | |
257 | 258 | /* otherwise check if it's in another .o within the patch module */ |
258 | 259 | return klp_find_object_symbol(pmod->name, name, addr); |