]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
alarmtimer: Lock k_itimer during timer callback
authorRichard Larocque <rlarocque@google.com>
Wed, 10 Sep 2014 01:31:05 +0000 (18:31 -0700)
committerJiri Slaby <jslaby@suse.cz>
Mon, 13 Oct 2014 13:41:34 +0000 (15:41 +0200)
commit6b492bab9c4edd84769ff057200b95c709e4b891
tree9bbf9f73554abe78d463dcc6041ff0bfe084e1b1
parente1f7a680a82fdc7a43fcc6fc5433b1aa13a0f427
alarmtimer: Lock k_itimer during timer callback

commit 474e941bed9262f5fa2394f9a4a67e24499e5926 upstream.

Locks the k_itimer's it_lock member when handling the alarm timer's
expiry callback.

The regular posix timers defined in posix-timers.c have this lock held
during timout processing because their callbacks are routed through
posix_timer_fn().  The alarm timers follow a different path, so they
ought to grab the lock somewhere else.

Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Richard Cochran <richardcochran@gmail.com>
Cc: Prarit Bhargava <prarit@redhat.com>
Cc: Sharvil Nanavati <sharvil@google.com>
Signed-off-by: Richard Larocque <rlarocque@google.com>
Signed-off-by: John Stultz <john.stultz@linaro.org>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
kernel/time/alarmtimer.c