diff options
author | Matt Fleming <[email protected]> | 2011-09-21 16:08:03 +0200 |
---|---|---|
committer | Ingo Molnar <[email protected]> | 2011-09-21 16:16:09 +0200 |
commit | 47997d756aa2a84ab577e1b0383cc12d582fc69c (patch) | |
tree | 9b5874e94a14f771a3e482fa09e1fc68785a9277 /net/lapb/lapb_out.c | |
parent | 9d037a777695993ec7437e5f451647dea7919d4c (diff) |
x86/rtc: Don't recursively acquire rtc_lock
A deadlock was introduced on x86 in commit ef68c8f87ed1 ("x86:
Serialize EFI time accesses on rtc_lock") because efi_get_time()
and friends can be called with rtc_lock already held by
read_persistent_time(), e.g.:
timekeeping_init()
read_persistent_clock() <-- acquire rtc_lock
efi_get_time()
phys_efi_get_time() <-- acquire rtc_lock <DEADLOCK>
To fix this let's push the locking down into the get_wallclock()
and set_wallclock() implementations. Only the clock
implementations that access the x86 RTC directly need to acquire
rtc_lock, so it makes sense to push the locking down into the
rtc, vrtc and efi code.
The virtualization implementations don't require rtc_lock to be
held because they provide their own serialization.
Signed-off-by: Matt Fleming <[email protected]>
Acked-by: Jan Beulich <[email protected]>
Acked-by: Avi Kivity <[email protected]> [for the virtualization aspect]
Cc: "H. Peter Anvin" <[email protected]>
Cc: Zhang Rui <[email protected]>
Cc: Josh Boyer <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Thomas Gleixner <[email protected]>
Signed-off-by: Ingo Molnar <[email protected]>
Diffstat (limited to 'net/lapb/lapb_out.c')
0 files changed, 0 insertions, 0 deletions