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]
Message-Id: <1223944714.8157.300.camel@pasglop>
Date:	Tue, 14 Oct 2008 11:38:34 +1100
From:	Benjamin Herrenschmidt <benh@...nel.crashing.org>
To:	Christian Borntraeger <borntraeger@...ibm.com>
Cc:	Linux PPC devel <linuxppc-dev@...abs.org>,
	Virtualization Mailing List <virtualization@...ts.osdl.org>,
	Jeremy Fitzhardinge <jeremy@...p.org>,
	Rusty Russell <rusty@...tcorp.com.au>,
	LKML <linux-kernel@...r.kernel.org>, Ingo Molnar <mingo@...e.hu>
Subject: Re: [RFC 1/3] hvc_console: rework setup to replace irq functions
	with callbacks


> Hmmm. 
> Can you try if this patch fixes the lockdep trace?

Yup, the patch fixes it, I'll commit it via the powerpc.git tree if you
don't have any objection.

Cheers,
Ben.

> This would be analog to
> commit b1b135c8d619cb2c7045d6ee4e48375882518bb5
> Author: Christian Borntraeger <borntraeger@...ibm.com>
> Date:   Thu Aug 7 09:18:34 2008 +0200
> 
>     fix spinlock recursion in hvc_console
> 
>     commit 611e097d7707741a336a0677d9d69bec40f29f3d
>     Author: Christian Borntraeger <borntraeger@...ibm.com>
>     hvc_console: rework setup to replace irq functions with callbacks
>     introduced a spinlock recursion problem.
> 
> 
> Signed-off-by: Christian Borntraeger<borntraeger@...ibm.com>
> ---
>  drivers/char/hvc_console.c |   10 +++++-----
>  1 file changed, 5 insertions(+), 5 deletions(-)
> 
> Index: linux-2.6/drivers/char/hvc_console.c
> ===================================================================
> --- linux-2.6.orig/drivers/char/hvc_console.c
> +++ linux-2.6/drivers/char/hvc_console.c
> @@ -367,13 +367,13 @@ static void hvc_close(struct tty_struct 
>  	spin_lock_irqsave(&hp->lock, flags);
>  
>  	if (--hp->count == 0) {
> -		if (hp->ops->notifier_del)
> -			hp->ops->notifier_del(hp, hp->data);
> -
>  		/* We are done with the tty pointer now. */
>  		hp->tty = NULL;
>  		spin_unlock_irqrestore(&hp->lock, flags);
>  
> +		if (hp->ops->notifier_del)
> +			hp->ops->notifier_del(hp, hp->data);
> +
>  		/*
>  		 * Chain calls chars_in_buffer() and returns immediately if
>  		 * there is no buffered data otherwise sleeps on a wait queue
> @@ -416,11 +416,11 @@ static void hvc_hangup(struct tty_struct
>  	hp->n_outbuf = 0;
>  	hp->tty = NULL;
>  
> +	spin_unlock_irqrestore(&hp->lock, flags);
> +
>  	if (hp->ops->notifier_del)
>  			hp->ops->notifier_del(hp, hp->data);
>  
> -	spin_unlock_irqrestore(&hp->lock, flags);
> -
>  	while(temp_open_count) {
>  		--temp_open_count;
>  		kref_put(&hp->kref, destroy_hvc_struct);

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