Merge branch 'x86-debug-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
[GitHub/mt8127/android_kernel_alcatel_ttab.git] / arch / x86 / kernel / alternative.c
index 1729d720299a0950f57320636274f30787696bbd..931280ff8299471df09b60033cdb06b46a361677 100644 (file)
@@ -669,7 +669,7 @@ static int __kprobes stop_machine_text_poke(void *data)
        struct text_poke_param *p;
        int i;
 
-       if (atomic_dec_and_test(&stop_machine_first)) {
+       if (atomic_xchg(&stop_machine_first, 0)) {
                for (i = 0; i < tpp->nparams; i++) {
                        p = &tpp->params[i];
                        text_poke(p->addr, p->opcode, p->len);