lkml.org 
[lkml]   [2008]   [Aug]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [BUG] rtc uie emulation deadlocks
On Mon, 11 Aug 2008 14:43:39 +0100 Russell King <rmk+lkml@arm.linux.org.uk> wrote:

> With CONFIG_RTC_INTF_DEV_UIE_EMUL=y, hwclock deadlocks in rtc_read_time
> due to:
>
> static long rtc_dev_ioctl(struct file *file,
> unsigned int cmd, unsigned long arg)
> {
> err = mutex_lock_interruptible(&rtc->ops_lock);
> if (err)
> return err;
> ...
> switch (cmd) {
> #ifdef CONFIG_RTC_INTF_DEV_UIE_EMUL
> case RTC_UIE_OFF:
> clear_uie(rtc);
> break;
>
> case RTC_UIE_ON:
> err = set_uie(rtc);
> #endif
> }
>
> static int set_uie(struct rtc_device *rtc)
> {
> err = rtc_read_time(rtc, &tm);
> ...
>
> int rtc_read_time(struct rtc_device *rtc, struct rtc_time *tm)
> {
> err = mutex_lock_interruptible(&rtc->ops_lock);
>
> So we try to take the same lock twice... Not good.
>
> The locking looks a rather random in there, so I'm not going to try to
> create a patch.
>

Looks like this was caused by

commit 5ad31a575157147b43fa84ef1e21471661653878
Author: David Brownell <david-b@pacbell.net>
Date: Wed Jul 23 21:30:33 2008 -0700

rtc: remove BKL for ioctl()




\
 
 \ /
  Last update: 2008-08-19 09:57    [W:1.095 / U:0.032 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site