Merge tag 'x86-splitlock-2021-04-26' of git://git.kernel.org/pub/scm/linux/kernel...
[platform/kernel/linux-starfive.git] / arch / x86 / kernel / traps.c
index 48881db..f577d07 100644 (file)
@@ -978,6 +978,10 @@ static __always_inline void exc_debug_user(struct pt_regs *regs,
                goto out_irq;
        }
 
+       /* #DB for bus lock can only be triggered from userspace. */
+       if (dr6 & DR_BUS_LOCK)
+               handle_bus_lock(regs);
+
        /* Add the virtual_dr6 bits for signals. */
        dr6 |= current->thread.virtual_dr6;
        if (dr6 & (DR_STEP | DR_TRAP_BITS) || icebp)