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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 15 Nov 2007 13:30:46 -0500
From:	Aristeu Rozanski <aris@...vo.org>
To:	Dan Aloni <da-x@...atomic.org>
Cc:	Linux Kernel List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] x86_64: fix a deadlock in set_rtc_mmss()

Hello Dan,
> Patch is valid only for 2.6.23.x, guessing from the recent arch/ changes 
> in 2.6.24-rc.
> 
> set_rtc_mmss() was used to be called from interrupt context in 2.6.22,
> however in 2.6.23, it is called from a timer context, where interrupts
> are enabled. This patch ensures that rtc_interrupt() won't dead-lock 
> with set_rtc_mmss().

> diff --git a/arch/x86_64/kernel/time.c b/arch/x86_64/kernel/time.c
> index 6241b50..8414236 100644
> --- a/arch/x86_64/kernel/time.c
> +++ b/arch/x86_64/kernel/time.c
> @@ -87,13 +87,14 @@ static int set_rtc_mmss(unsigned long nowtime)
>  	int retval = 0;
>  	int real_seconds, real_minutes, cmos_minutes;
>  	unsigned char control, freq_select;
> +	unsigned long flags;
>  
>  /*
>   * IRQs are disabled when we're called from the timer interrupt,
>   * no need for spin_lock_irqsave()
>   */
>  
> -	spin_lock(&rtc_lock);
> +	spin_lock_irqsave(&rtc_lock, flags);
I think it's a good idea to update or just remove the comment above.

-- 
Aristeu

-
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