lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 11 Aug 2008 14:43:39 +0100
From:	Russell King <rmk+lkml@....linux.org.uk>
To:	a.zummo@...ertech.it,
	Linux Kernel List <linux-kernel@...r.kernel.org>
Subject: [BUG] rtc uie emulation deadlocks

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.

-- 
Russell King
 Linux kernel    2.6 ARM Linux   - http://www.arm.linux.org.uk/
 maintainer of:
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ