public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Alex Nixon <alex.nixon@citrix.com>
To: Christian Borntraeger <borntraeger@de.ibm.com>
Cc: Jeremy Fitzhardinge <jeremy@goop.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Rusty Russell <rusty@rustcorp.com.au>
Subject: Re: Spinlock recursion in hvc_poll
Date: Wed, 06 Aug 2008 10:12:46 +0100	[thread overview]
Message-ID: <48996B0E.5000009@citrix.com> (raw)
In-Reply-To: <200808052253.10285.borntraeger@de.ibm.com>

Christian Borntraeger wrote:
> Am Dienstag, 5. August 2008 schrieb Jeremy Fitzhardinge:
>> Alex Nixon wrote:
>>>>> Well I say fixed - it just means I can proceed to a spinlock recursion
>>>>> BUG() 2 secs into the boot process
> 
> Ok, this is a guess, I dont fully understand the backtrace.
> 
> request_irq tries to call the handler if the IRQ is shared. The irq handler 
> calls hvc_poll and hvc_kill which might take the same spinlock. 
> Can you test it this patch fixes the problem?

The patch appears to fix things.

- Alex

> 
> Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
> ---
>  drivers/char/hvc_console.c |    3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> 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
> @@ -322,10 +322,11 @@ static int hvc_open(struct tty_struct *t
>  
>  	hp->tty = tty;
>  
> +	spin_unlock_irqrestore(&hp->lock, flags);
> +
>  	if (hp->ops->notifier_add)
>  		rc = hp->ops->notifier_add(hp, hp->data);
>  
> -	spin_unlock_irqrestore(&hp->lock, flags);
>  
>  
>  	/*
> 


  reply	other threads:[~2008-08-06  9:23 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <48973E59.1000904@citrix.com>
     [not found] ` <489742CF.2030305@goop.org>
     [not found]   ` <4898096F.4030607@citrix.com>
     [not found]     ` <48987526.40500@goop.org>
     [not found]       ` <48987DD8.8080009@citrix.com>
2008-08-05 18:08         ` Spinlock recursion in hvc_poll Jeremy Fitzhardinge
2008-08-05 20:53           ` Christian Borntraeger
2008-08-06  9:12             ` Alex Nixon [this message]
2008-08-07  7:18               ` Christian Borntraeger
2008-08-08  6:50                 ` Rusty Russell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=48996B0E.5000009@citrix.com \
    --to=alex.nixon@citrix.com \
    --cc=borntraeger@de.ibm.com \
    --cc=jeremy@goop.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rusty@rustcorp.com.au \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox