Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 309120 Details for
Bug 450786
[Stratus 5.3 bug] kernel NULL pointer dereference at usbdev_read
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
Alan Stern's second patch
linux-2.6-usbdev_read.mail (text/plain), 3.67 KB, created by
Pete Zaitcev
on 2008-06-12 18:12:49 UTC
(
hide
)
Description:
Alan Stern's second patch
Filename:
MIME Type:
Creator:
Pete Zaitcev
Created:
2008-06-12 18:12:49 UTC
Size:
3.67 KB
patch
obsolete
>Date: Thu, 12 Jun 2008 13:18:27 -0400 (EDT) >From: Alan Stern <stern@rowland.harvard.edu> >To: "Petrakis, Peter" <Peter.Petrakis@stratus.com> >cc: Pete Zaitcev <zaitcev@redhat.com>, Greg KH <greg@kroah.com>, > <linux-usb@vger.kernel.org>, > "Evans, Robert" <Robert.Evans@stratus.com> >Subject: RE: crash in usbdev_read >In-Reply-To: <DA0E7D869C862D4095C265233CD1D41E0E3E47@EXNA.corp.stratus.com> >Message-ID: <Pine.LNX.4.44L0.0806121317040.2136-100000@iolanthe.rowland.org> >MIME-Version: 1.0 >Content-Type: TEXT/PLAIN; charset=US-ASCII > >On Thu, 12 Jun 2008, Petrakis, Peter wrote: > >> Hi Pete, >> >> After lots of testing we've confirmed that the fix works. We've also >> disproved my ref counting theory. It would be great to see this in the >> next RedHat errata and upstream. Alas, Kimball doesn't work at RedHat >> anymore, our new guy there is Simon McGrath. Thanks! > >Here's a different attempt to solve the same problem. This patch is >definitely more acceptable than the earlier one. > >Alan Stern > > > >Index: usb-2.6/drivers/usb/core/devio.c >=================================================================== >--- usb-2.6.orig/drivers/usb/core/devio.c >+++ usb-2.6/drivers/usb/core/devio.c >@@ -1678,6 +1678,27 @@ const struct file_operations usbdev_file > .release = usbdev_release, > }; > >+void usb_fs_classdev_common_remove(struct usb_device *udev) >+{ >+ struct dev_state *ps; >+ struct siginfo sinfo; >+ >+ while (!list_empty(&udev->filelist)) { >+ ps = list_entry(udev->filelist.next, struct dev_state, list); >+ wake_up_all(&ps->wait); >+ list_del_init(&ps->list); >+ if (ps->discsignr) { >+ sinfo.si_signo = ps->discsignr; >+ sinfo.si_errno = EPIPE; >+ sinfo.si_code = SI_ASYNCIO; >+ sinfo.si_addr = ps->disccontext; >+ kill_pid_info_as_uid(ps->discsignr, &sinfo, >+ ps->disc_pid, ps->disc_uid, >+ ps->disc_euid, ps->secid); >+ } >+ } >+} >+ > #ifdef CONFIG_USB_DEVICE_CLASS > static struct class *usb_classdev_class; > >@@ -1697,6 +1718,7 @@ static int usb_classdev_add(struct usb_d > static void usb_classdev_remove(struct usb_device *dev) > { > device_unregister(dev->usb_classdev); >+ usb_fs_classdev_common_remove(dev); > } > > static int usb_classdev_notify(struct notifier_block *self, >Index: usb-2.6/drivers/usb/core/inode.c >=================================================================== >--- usb-2.6.orig/drivers/usb/core/inode.c >+++ usb-2.6/drivers/usb/core/inode.c >@@ -712,25 +712,11 @@ static void usbfs_add_device(struct usb_ > > static void usbfs_remove_device(struct usb_device *dev) > { >- struct dev_state *ds; >- struct siginfo sinfo; >- > if (dev->usbfs_dentry) { > fs_remove_file (dev->usbfs_dentry); > dev->usbfs_dentry = NULL; > } >- while (!list_empty(&dev->filelist)) { >- ds = list_entry(dev->filelist.next, struct dev_state, list); >- wake_up_all(&ds->wait); >- list_del_init(&ds->list); >- if (ds->discsignr) { >- sinfo.si_signo = ds->discsignr; >- sinfo.si_errno = EPIPE; >- sinfo.si_code = SI_ASYNCIO; >- sinfo.si_addr = ds->disccontext; >- kill_pid_info_as_uid(ds->discsignr, &sinfo, ds->disc_pid, ds->disc_uid, ds->disc_euid, ds->secid); >- } >- } >+ usb_fs_classdev_common_remove(dev); > } > > static int usbfs_notify(struct notifier_block *self, unsigned long action, void *dev) >Index: usb-2.6/drivers/usb/core/usb.h >=================================================================== >--- usb-2.6.orig/drivers/usb/core/usb.h >+++ usb-2.6/drivers/usb/core/usb.h >@@ -142,6 +142,7 @@ extern struct usb_driver usbfs_driver; > extern const struct file_operations usbfs_devices_fops; > extern const struct file_operations usbdev_file_operations; > extern void usbfs_conn_disc_event(void); >+extern void usb_fs_classdev_common_remove(struct usb_device *udev); > > extern int usb_devio_init(void); > extern void usb_devio_cleanup(void);
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 450786
:
308923
|
309101
| 309120 |
309142
|
309305
|
309692
|
310292
|
312710
|
312722
|
313707
|
313771