]> www.infradead.org Git - users/jedix/linux-maple.git/commit
Fix clock_was_set so it is safe to call from atomic
authorJohn Stultz <john.stultz@linaro.org>
Mon, 2 Jul 2012 00:25:12 +0000 (20:25 -0400)
committerMaxim Uvarov <maxim.uvarov@oracle.com>
Thu, 5 Jul 2012 10:01:50 +0000 (03:01 -0700)
commitf84af0ca7768cc12c300cfc42289706199a0c93c
tree4814bfb38c922a4de12c308dad0998f9f2be95bf
parentea7a82f5107723b66273823a83e0f289b4f1bdd9
Fix clock_was_set so it is safe to call from atomic

Backport for 3.0.36

NOTE:This is a prerequisite patch that's required to
address the widely observed leap-second related futex/hrtimer
issues.

Currently clock_was_set() is unsafe to be called from atomic
context, as it calls on_each_cpu(). This causes problems when
we need to adjust the time from update_wall_time().

To fix this, introduce a work_struct so if we're in_atomic,
we can schedule work to do the necessary update after we're
out of the atomic section.

CC: Prarit Bhargava <prarit@redhat.com>
CC: stable@vger.kernel.org
CC: Thomas Gleixner <tglx@linutronix.de>
Reported-by: Jan Engelhardt <jengelh@inai.de>
Signed-off-by: John Stultz <johnstul@us.ibm.com>
kernel/hrtimer.c