From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Christian Borntraeger <borntraeger@de.ibm.com>
Cc: Jeremy Fitzhardinge <jeremy@goop.org>,
Virtualization Mailing List <virtualization@lists.osdl.org>,
Rusty Russell <rusty@rustcorp.com.au>,
LKML <linux-kernel@vger.kernel.org>,
Linux PPC devel <linuxppc-dev@ozlabs.org>,
Ingo Molnar <mingo@elte.hu>
Subject: Re: [RFC 1/3] hvc_console: rework setup to replace irq functions with callbacks
Date: Tue, 14 Oct 2008 11:38:34 +1100 [thread overview]
Message-ID: <1223944714.8157.300.camel@pasglop> (raw)
In-Reply-To: <200810130951.31733.borntraeger@de.ibm.com>
> 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@de.ibm.com>
> Date: Thu Aug 7 09:18:34 2008 +0200
>
> fix spinlock recursion in hvc_console
>
> commit 611e097d7707741a336a0677d9d69bec40f29f3d
> Author: Christian Borntraeger <borntraeger@de.ibm.com>
> hvc_console: rework setup to replace irq functions with callbacks
> introduced a spinlock recursion problem.
>
>
> Signed-off-by: Christian Borntraeger<borntraeger@de.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);
next prev parent reply other threads:[~2008-10-14 0:41 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-03 12:44 [RFC 0/3]: hvc_console rework for platform without hard irqs Christian Borntraeger
2008-06-03 12:45 ` [RFC 1/3] hvc_console: rework setup to replace irq functions with callbacks Christian Borntraeger
2008-06-04 0:13 ` Rusty Russell
2008-06-04 11:15 ` Christian Borntraeger
2008-10-13 5:16 ` Benjamin Herrenschmidt
2008-10-13 7:51 ` Christian Borntraeger
2008-10-13 8:36 ` Benjamin Herrenschmidt
2008-10-13 8:47 ` Christian Borntraeger
2008-10-13 9:52 ` Benjamin Herrenschmidt
2008-10-14 0:38 ` Benjamin Herrenschmidt [this message]
2008-10-14 6:42 ` Christian Borntraeger
2008-10-14 8:18 ` Benjamin Herrenschmidt
2008-06-03 12:46 ` [RFC 2/3] virtio_console: use virtqueue notification for hvc_console Christian Borntraeger
2008-06-03 17:24 ` Arnd Bergmann
2008-06-03 12:46 ` [RFC 3/3] s390: use virtio_console for KVM on s390 Christian Borntraeger
2008-06-03 12:49 ` [RFC 1/3] hvc_console: rework setup to replace irq functions with callbacks (not word wrapped) Christian Borntraeger
2008-06-03 17:30 ` Arnd Bergmann
2008-06-04 8:00 ` Christian Borntraeger
2008-06-04 9:06 ` Benjamin Herrenschmidt
2008-06-20 13:24 ` [RFC 1/3 v2] hvc_console: rework setup to replace irq functions with callbacks Christian Borntraeger
2008-06-27 5:27 ` Rusty Russell
2008-06-20 13:24 ` [RFC 2/3 v2] virtio_console: use virtqueue notification for hvc_console Christian Borntraeger
2008-06-20 13:24 ` [RFC 3/3 v2] s390: use virtio_console for KVM on s390 Christian Borntraeger
2008-06-23 3:04 ` 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=1223944714.8157.300.camel@pasglop \
--to=benh@kernel.crashing.org \
--cc=borntraeger@de.ibm.com \
--cc=jeremy@goop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@ozlabs.org \
--cc=mingo@elte.hu \
--cc=rusty@rustcorp.com.au \
--cc=virtualization@lists.osdl.org \
/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;
as well as URLs for NNTP newsgroup(s).