mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Alan Cox <alan@lxorguk.ukuu.org.uk>
To: Daniel Mack <daniel@caiaq.de>
Cc: Alan Stern <stern@rowland.harvard.edu>,
	Kernel development list <linux-kernel@vger.kernel.org>,
	USB list <linux-usb@vger.kernel.org>
Subject: Re: [PATCH] [usb-serial] fix Ooops on uplug
Date: Tue, 21 Jul 2009 17:28:41 +0100	[thread overview]
Message-ID: <20090721172841.36b20638@lxorguk.ukuu.org.uk> (raw)
In-Reply-To: <20090721161928.GD13236@buzzloop.caiaq.de>

> It was, at least in my case. Did some printk debugging and it showed
> that the hangup callback was entered what freed the serial device.

Ok 
> 
> > > This is only a lockdep warning, and I don't understand its
> > > significance.  Even worse, when I plugged in a USB flash drive
> > > afterward this appeared:
> > 
> > Looks like something freed the resources but didn't hang up when the
> > disconnect occurred
> 
> Probably the real fix would be to let the tty layer know the device died
> from the hangup handler.

The hangup event means the physical hardware must no longer be touched so
that's already the case and we use it for a lot of things (from ISAPnP to
PCMCIA to USB).

The USB code does slightly misimplement it - it calls tty_hangup() in
usb_serial_disconnect when it should call tty_vhangup() as it needs the
event to be synchronous. That is the hangup of the tty should be done
before the USB layer can sneak off and free stuff.

I don't at this point see that as explaining the bug however

  reply	other threads:[~2009-07-21 16:27 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20090720155502.50b84ae9@lxorguk.ukuu.org.uk>
2009-07-20 17:51 ` Daniel Mack
2009-07-20 22:48   ` Alan Cox
2009-07-20 21:58     ` Daniel Mack
2009-07-20 23:45       ` Alan Cox
2009-07-21 15:53         ` Alan Stern
2009-07-21 15:56           ` Daniel Mack
2009-07-21 16:00             ` Alan Cox
2009-07-21 16:11               ` Alan Stern
2009-07-21 16:18                 ` Alan Cox
2009-07-21 16:16           ` Alan Cox
2009-07-21 16:19             ` Daniel Mack
2009-07-21 16:28               ` Alan Cox [this message]
2009-07-21 18:36             ` Alan Stern
2009-07-21 19:21               ` Alan Cox
2009-07-21 21:38                 ` Alan Stern
2009-07-21 22:55                   ` Alan Cox
2009-07-22 14:44                     ` Alan Stern
2009-07-22 16:17                       ` Alan Cox
2009-07-22 18:21                         ` Alan Stern
2009-07-22 22:35                           ` Alan Cox
2009-07-22 22:45                             ` Alan Stern
2009-07-22 22:48                               ` Alan Cox
2009-07-20 23:32   ` Alan Cox

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=20090721172841.36b20638@lxorguk.ukuu.org.uk \
    --to=alan@lxorguk.ukuu.org.uk \
    --cc=daniel@caiaq.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=stern@rowland.harvard.edu \
    /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

all inboxes | Powered by JetHome®