diff options
Diffstat (limited to 'arch/arm64/kernel/insn.c')
| -rw-r--r-- | arch/arm64/kernel/insn.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/arch/arm64/kernel/insn.c b/arch/arm64/kernel/insn.c index e007714ded04..8cd27fedc8b6 100644 --- a/arch/arm64/kernel/insn.c +++ b/arch/arm64/kernel/insn.c | |||
| @@ -163,9 +163,10 @@ static int __kprobes aarch64_insn_patch_text_cb(void *arg) | |||
| 163 | * which ends with "dsb; isb" pair guaranteeing global | 163 | * which ends with "dsb; isb" pair guaranteeing global |
| 164 | * visibility. | 164 | * visibility. |
| 165 | */ | 165 | */ |
| 166 | atomic_set(&pp->cpu_count, -1); | 166 | /* Notify other processors with an additional increment. */ |
| 167 | atomic_inc(&pp->cpu_count); | ||
| 167 | } else { | 168 | } else { |
| 168 | while (atomic_read(&pp->cpu_count) != -1) | 169 | while (atomic_read(&pp->cpu_count) <= num_online_cpus()) |
| 169 | cpu_relax(); | 170 | cpu_relax(); |
| 170 | isb(); | 171 | isb(); |
| 171 | } | 172 | } |
