Re: [PATCH -tip 0/2] fix lock inversion in lockless sys_times()

From: Peter Zijlstra
Date: Sun Sep 14 2014 - 05:22:10 EST


On Fri, Sep 12, 2014 at 09:12:13AM -0400, riel@xxxxxxxxxx wrote:
> The sig->stats_lock nests inside the tasklist_lock and the
> sighand->siglock in __exit_signal and wait_task_zombie.
>
> However, both of those locks can be taken from irq context,
> which means we need to use the interrupt safe variant of
> read_seqbegin_or_lock. This blocks interrupts when the "lock"
> branch is taken (seq is odd), preventing the lock inversion.
>
> On the first (lockless) pass through the loop, irqs are not
> blocked.
>
> This fixes the lockdep complaints that Stanislaw reported.
>

Thanks Rik
--
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/