lkml.org 
[lkml]   [2011]   [Jul]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] x86: serialize EFI time accesses on rtc_lock
On Tue, Jul 19, 2011 at 11:32:05PM +0600, Rakib Mullick wrote:

> If I'm not missing anything, this implementation (serialization) could
> be simpler by holding rtc_lock at the time of calling those functions.
> I mean, holding rtc_lock before calling EFI services
> virt_efi_get/set_time and virt_efi_get/set_wakeup_time - something
> like below:
>
> spin_lock_irqsave(&rtc_lock, flags);
> efi.get_time = virt_efi_get_time;
> efi.set_time = virt_efi_set_time;
> efi.get_wakeup_time = virt_efi_get_wakeup_time;
> efi.set_wakeup_time = virt_efi_set_wakeup_time;
> spin_unlock_irqrestore(&rtc_lock, flags);

That's just assigning some function pointers, not actually making the
calls. There's potentially several routes to each of the calls, so it
makes sense to do the locking there.

--
Matthew Garrett | mjg59@srcf.ucam.org


\
 
 \ /
  Last update: 2011-07-19 19:57    [W:0.178 / U:0.604 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site