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] [day] [month] [year] [list]
Date:	Tue, 21 Oct 2008 19:35:26 +0200
From:	Andi Kleen <andi@...stfloor.org>
To:	David John <davidjon@...ontk.org>
Cc:	mingo@...e.hu, akpm@...ux-foundation.org, alan@...rguk.ukuu.org.uk,
	linux-kernel@...r.kernel.org, venkatesh.pallipadi@...el.com,
	tglx@...utronix.de
Subject: Re: [PATCH v5] HPET: Remove the BKL.

David John <davidjon@...ontk.org> writes:

>  	switch (cmd) {
>  	case HPET_IE_OFF:
> -		if ((devp->hd_flags & HPET_IE) == 0)
> +		spin_lock_irq(&hpet_lock);
> +		if ((devp->hd_flags & HPET_IE) == 0) {
> +			spin_unlock_irq(&hpet_lock);
>  			break;

Reads don't need to be locked here, so you could just move the spin_lock_irq
down a bit and avoid the redundant unlock_irq. Same below.

> +		}

-Andi

-- 
ak@...ux.intel.com
--
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