diff options
| author | James Morris <james.l.morris@oracle.com> | 2017-07-24 20:44:18 -0400 |
|---|---|---|
| committer | James Morris <james.l.morris@oracle.com> | 2017-07-24 20:44:18 -0400 |
| commit | 53a2ebaaabc1eb8458796fec3bc1e0e80746b642 (patch) | |
| tree | 9d1f9227b49392cdd2edcc01057517da4f4b09c2 /kernel/livepatch/patch.c | |
| parent | 3cf29931453215536916d0c4da953fce1911ced3 (diff) | |
| parent | 520eccdfe187591a51ea9ab4c1a024ae4d0f68d9 (diff) | |
sync to Linus v4.13-rc2 for subsystem developers to work against
Diffstat (limited to 'kernel/livepatch/patch.c')
| -rw-r--r-- | kernel/livepatch/patch.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/kernel/livepatch/patch.c b/kernel/livepatch/patch.c index f8269036bf0b..52c4e907c14b 100644 --- a/kernel/livepatch/patch.c +++ b/kernel/livepatch/patch.c | |||
| @@ -59,7 +59,11 @@ static void notrace klp_ftrace_handler(unsigned long ip, | |||
| 59 | 59 | ||
| 60 | ops = container_of(fops, struct klp_ops, fops); | 60 | ops = container_of(fops, struct klp_ops, fops); |
| 61 | 61 | ||
| 62 | rcu_read_lock(); | 62 | /* |
| 63 | * A variant of synchronize_sched() is used to allow patching functions | ||
| 64 | * where RCU is not watching, see klp_synchronize_transition(). | ||
| 65 | */ | ||
| 66 | preempt_disable_notrace(); | ||
| 63 | 67 | ||
| 64 | func = list_first_or_null_rcu(&ops->func_stack, struct klp_func, | 68 | func = list_first_or_null_rcu(&ops->func_stack, struct klp_func, |
| 65 | stack_node); | 69 | stack_node); |
| @@ -115,7 +119,7 @@ static void notrace klp_ftrace_handler(unsigned long ip, | |||
| 115 | 119 | ||
| 116 | klp_arch_set_pc(regs, (unsigned long)func->new_func); | 120 | klp_arch_set_pc(regs, (unsigned long)func->new_func); |
| 117 | unlock: | 121 | unlock: |
| 118 | rcu_read_unlock(); | 122 | preempt_enable_notrace(); |
| 119 | } | 123 | } |
| 120 | 124 | ||
| 121 | /* | 125 | /* |
