[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1410527535-9814-1-git-send-email-riel@redhat.com>
Date: Fri, 12 Sep 2014 09:12:13 -0400
From: riel@...hat.com
To: peterz@...radead.org
Cc: linux-kernel@...r.kernel.org, mingo@...nel.org, prarit@...hat.com,
oleg@...hat.com, sgruszka@...hat.com
Subject: [PATCH -tip 0/2] fix lock inversion in lockless sys_times()
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.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists