kernel/arch/powerpc/kernel/hw_breakpoint.c
.. .. @@ -479,11 +479,13 @@ 479 479 struct arch_hw_breakpoint *info; 480 480 int i; 481 481 482 + preempt_disable();483 +482 484 for (i = 0; i < nr_wp_slots(); i++) { 483 485 if (unlikely(tsk->thread.last_hit_ubp[i])) 484 486 goto reset; 485 487 } 486 - return;488 + goto out;487 489 488 490 reset: 489 491 regs->msr &= ~MSR_SE; .. .. @@ -492,6 +494,9 @@ 492 494 __set_breakpoint(i, info); 493 495 tsk->thread.last_hit_ubp[i] = NULL; 494 496 } 497 +498 +out:499 + preempt_enable();495 500 } 496 501 497 502 static bool is_larx_stcx_instr(int type)