Re: [PATCH] x86, traps: Fix ist_enter from userspace

From: Sasha Levin
Date: Sat Jan 31 2015 - 10:10:26 EST


On 01/31/2015 08:01 AM, Andy Lutomirski wrote:
> context_tracking_user_exit() has no effect if in_interrupt() returns true,
> so ist_enter() didn't work. Fix it by calling exception_enter(), and thus
> context_tracking_user_exit(), before incrementing the preempt count.
>
> This also adds an assertion that will catch the problem reliably if
> CONFIG_PROVE_RCU=y to help prevent the bug from being reintroduced.
>
> Fixes: 959274753857 x86, traps: Track entry into and exit from IST context
> Reported-by: Sasha Levin <sasha.levin@xxxxxxxxxx>
> Signed-off-by: Andy Lutomirski <luto@xxxxxxxxxxxxxx>

I was running something like that overnight, looks like it fixes the problem.

Tested-by: Sasha Levin <sasha.levin@xxxxxxxxxx>


Thanks,
Sasha
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/