From: Arnd Bergmann Date: Tue, 20 May 2008 17:15:55 +0000 (+0200) Subject: genrtc: BKL pushdown X-Git-Tag: v2.6.27-rc1~1103^2~62 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=742a2fe31bf311d065a2bbacc2b363103b351300;p=linux-2.6-omap-h63xx.git genrtc: BKL pushdown Signed-off-by: Arnd Bergmann --- diff --git a/drivers/char/genrtc.c b/drivers/char/genrtc.c index 69f0a2993af..aac0985a572 100644 --- a/drivers/char/genrtc.c +++ b/drivers/char/genrtc.c @@ -51,6 +51,7 @@ #include #include #include +#include #include #include @@ -338,12 +339,16 @@ static int gen_rtc_ioctl(struct inode *inode, struct file *file, static int gen_rtc_open(struct inode *inode, struct file *file) { - if (gen_rtc_status & RTC_IS_OPEN) + lock_kernel(); + if (gen_rtc_status & RTC_IS_OPEN) { + unlock_kernel(); return -EBUSY; + } gen_rtc_status |= RTC_IS_OPEN; gen_rtc_irq_data = 0; irq_active = 0; + unlock_kernel(); return 0; }