From: Paul Fulghum <paulkf@microgate.com>
To: Bob Copeland <email@bobcopeland.com>
Cc: paulus@samba.org,
Linux Kernel list <linux-kernel@vger.kernel.org>,
Greg KH <greg@kroah.com>,
linux-usb-devel@lists.sourceforge.net
Subject: Re: 2.6.16-rc5 pppd oops on disconnects
Date: Sun, 12 Mar 2006 20:21:54 -0600 [thread overview]
Message-ID: <4414D742.4090007@microgate.com> (raw)
In-Reply-To: <b6c5339f0603120958y7ebc2051q51e24835456d9fcd@mail.gmail.com>
Bob Copeland wrote:
> On 3/12/06, Paul Fulghum <paulkf@microgate.com> wrote:
>
>>--- linux-2.6.16-rc5/drivers/usb/class/cdc-acm.c 2006-02-27 09:24:29.000000000 -0600
>>+++ b/drivers/usb/class/cdc-acm.c 2006-03-12 10:22:21.000000000 -0600
>>@@ -980,7 +980,7 @@ skip_normal_probe:
>> usb_driver_claim_interface(&acm_driver, data_interface, acm);
>>
>> usb_get_intf(control_interface);
>>- tty_register_device(acm_tty_driver, minor, &control_interface->dev);
>>+ tty_register_device(acm_tty_driver, minor, NULL);
>>
>> acm_table[minor] = acm;
>> usb_set_intfdata (intf, acm);
>>
>
>
> Paul,
>
> No oops with the above patch.
>
> thanks!
> -Bob
I think what is happening is that control_interface->dev is used
to back 2 sysfs entries (one usb, and one tty). When the usb
device is disconnected, the usb sysfs entries are removed and
the backing device is released. But the tty sysfs entry is
not removed until later after the tty is closed. This removal oops
because the backing device (or some sysfs entity associated with
the backing device) has already been freed. The slab poisoning
is needed to catch this. That's my theory, but I'm no expert
on USB or sysfs.
The above change does not associate the device
with the tty object, and no tty sysfs entry is made that
references the device. No function is lost, but some info
is not exported to userland.
I guess a more thorough approach would be to somehow not release
the usb device until the tty close completes. But that sounds
kind of messy, as the usb code would need to know about any
other class sysfs entries besides usb. (tty, maybe storage, etc)
Greg or the USB folks are more qualified to decide the details.
Thanks for your help Bob.
--
Paul
next prev parent reply other threads:[~2006-03-13 2:22 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-03-10 14:25 2.6.16-rc5 pppd oops on disconnects Bob Copeland
2006-03-10 17:22 ` Paul Fulghum
2006-03-10 18:48 ` Bob Copeland
2006-03-10 19:25 ` Paul Fulghum
2006-03-11 15:09 ` Bob Copeland
2006-03-11 17:56 ` Paul Fulghum
2006-03-11 20:21 ` Bob Copeland
2006-03-11 21:57 ` Paul Fulghum
2006-03-12 16:26 ` Paul Fulghum
2006-03-12 17:58 ` Bob Copeland
2006-03-12 20:09 ` [linux-usb-devel] " Oliver Neukum
2006-03-12 21:30 ` Bob Copeland
2006-03-13 2:21 ` Paul Fulghum [this message]
2006-03-12 5:35 ` Greg KH
2006-03-12 16:31 ` Bob Copeland
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=4414D742.4090007@microgate.com \
--to=paulkf@microgate.com \
--cc=email@bobcopeland.com \
--cc=greg@kroah.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb-devel@lists.sourceforge.net \
--cc=paulus@samba.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