From: Greg KH <greg@kroah.com>
To: Ingo Oeser <ingo@oeser-vu.de>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [OOPS] 2.4.22, USB visor module crashing on HotSync.
Date: Fri, 5 Sep 2003 08:24:36 -0700 [thread overview]
Message-ID: <20030905152436.GB16363@kroah.com> (raw)
On Fri, Sep 05, 2003 at 01:30:22PM +0200, Ingo Oeser wrote:
> Hi Greg,
>
> there seems to be a problem with the visor module and usb_serial.
>
> Please look at __serial_close() and usb_disconnect() calling it
> in line 1406 vs. line 1408. I would suggest removing 1408 or
> folding it into __serial_close().
>
> Formal Bug-Reporting follows:
>
> [1.] One line summary of the problem:
>
> USB visor module and usb_serial crashing on HotSync in usb_disconnect
>
> [2.] Full description of the problem/report:
>
> usb_disconnect calls __serial_close() which sets the tty = NULL
> and afterwards trys to set tty->private_data = NULL
> which will crash
Nice, someone else reported this yesterday for the ftdi_sio driver.
Can you test the patch below and let me know if this fixes it?
thanks,
greg k-h
--- a/drivers/usb/serial/usbserial.c Sat Aug 30 23:27:18 2003
+++ b/drivers/usb/serial/usbserial.c Thu Sep 4 13:48:45 2003
@@ -556,7 +556,10 @@
else
generic_close(port, filp);
port->open_count = 0;
- port->tty = NULL;
+ if (port->tty) {
+ port->tty->driver_data = NULL;
+ port->tty = NULL;
+ }
}
if (port->serial->type->owner)
@@ -1401,12 +1404,9 @@
for (i = 0; i < serial->num_ports; ++i) {
port = &serial->port[i];
down (&port->sem);
- if (port->tty != NULL) {
- while (port->open_count > 0) {
+ if (port->tty != NULL)
+ while (port->open_count > 0)
__serial_close(port, NULL);
- }
- port->tty->driver_data = NULL;
- }
up (&port->sem);
}
next reply other threads:[~2003-09-05 16:10 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-09-05 15:24 Greg KH [this message]
2003-09-24 9:05 ` [OOPS] 2.4.22, USB visor module crashing on HotSync Ingo Oeser
-- strict thread matches above, loose matches on Subject: below --
2003-09-05 15:23 Greg KH
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=20030905152436.GB16363@kroah.com \
--to=greg@kroah.com \
--cc=ingo@oeser-vu.de \
--cc=linux-kernel@vger.kernel.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