Message ID | 200810130951.31733.borntraeger@de.ibm.com (mailing list archive) |
---|---|
State | Accepted, archived |
Commit | eef2622a9fcfa964073333ea72c7c9cd20ad45e6 |
Headers | show |
Am Dienstag, 14. Oktober 2008 schrieb Benjamin Herrenschmidt: > > > 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. Sure, go ahead.
On Tue, 2008-10-14 at 08:42 +0200, Christian Borntraeger wrote: > Am Dienstag, 14. Oktober 2008 schrieb Benjamin Herrenschmidt: > > > > > 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. > > Sure, go ahead. Allright, I have a batch about ready to go to Linus, so I'll add that and ask him to pull tomorrow. Thanks, Ben.
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);