Messages in this thread | | | Date | Tue, 19 Jul 2011 18:54:32 +0100 | From | Matthew Garrett <> | Subject | Re: [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
| |