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:	Mon, 24 Jan 2011 16:28:31 +0100
From:	Ingo Molnar <mingo@...e.hu>
To:	Alexander Gordeev <lasaine@....cs.msu.su>
Cc:	Linus Torvalds <torvalds@...ux-foundation.org>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	Thomas Gleixner <tglx@...utronix.de>
Subject: Re: [PATCH] parport: make lockdep happy with waitlist_lock


* Alexander Gordeev <lasaine@....cs.msu.su> wrote:

> parport_unregister_device should never be used when interrupts are
> enabled in hardware and irq handler is registered so there is no need
> to disable interrupts when using waitlist_lock. But there is no way to
> explain this subtle semantics to lockdep analyzer. So disable interrupts
> here too to simplify things. The price is negligible.
> 
> Signed-off-by: Alexander Gordeev <lasaine@....cs.msu.su>
> ---
>  drivers/parport/share.c |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/parport/share.c b/drivers/parport/share.c
> index a2d9d1e..c3dd1a3 100644
> --- a/drivers/parport/share.c
> +++ b/drivers/parport/share.c
> @@ -678,7 +678,7 @@ void parport_unregister_device(struct pardevice *dev)
>  
>  	/* Make sure we haven't left any pointers around in the wait
>  	 * list. */
> -	spin_lock (&port->waitlist_lock);
> +	spin_lock_irq (&port->waitlist_lock);

Small detail: please use a consistent coding style, i.e. 'spin_lock_irq(', not 
'spin_lock_irq ('.

Thanks,

	Ingo
--
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