All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christian Borntraeger <borntraeger@de.ibm.com>
To: Alex Nixon <alex.nixon@citrix.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: Tue, 5 Aug 2008 22:53:10 +0200	[thread overview]
Message-ID: <200808052253.10285.borntraeger@de.ibm.com> (raw)
In-Reply-To: <48989727.8090804@goop.org>

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, but it should be easier to track 
down
> >>> with printks and a coherent stack dump at my disposal.
> >>>   
> >>>       
> >> What's the backtrace on this?
> >>     
> >
> > I just turned DEBUG_SPINLOCKS back on to try catch this bug again, and it
> > seems to occur (very roughly) 1/10 of the time, with nothing changing 
between
> > runs.

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?

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-05 20:53 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 [this message]
2008-08-06  9:12             ` Alex Nixon
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=200808052253.10285.borntraeger@de.ibm.com \
    --to=borntraeger@de.ibm.com \
    --cc=alex.nixon@citrix.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.