Use rtc_lock to protect RTC operations
Many RTC routines were not protected against each other, so there are potential races, for example, ntp-update against /dev/rtc. This patch fixes them using rtc_lock. Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
This commit is contained in:
committed by
Ralf Baechle
parent
e329331aed
commit
53c2df2f4e
@@ -20,6 +20,9 @@
|
||||
#include <linux/linkage.h>
|
||||
#include <linux/ptrace.h>
|
||||
#include <linux/rtc.h>
|
||||
#include <linux/spinlock.h>
|
||||
|
||||
extern spinlock_t rtc_lock;
|
||||
|
||||
/*
|
||||
* RTC ops. By default, they point to no-RTC functions.
|
||||
|
Reference in New Issue
Block a user