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 309101 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.
[patch]
Fix without instrumentation
linux-2.6-usb-usbdev_read-null-pointer-dereference.patch (text/plain), 2.22 KB, created by
Robert N. Evans
on 2008-06-12 16:59:37 UTC
(
hide
)
Description:
Fix without instrumentation
Filename:
MIME Type:
Creator:
Robert N. Evans
Created:
2008-06-12 16:59:37 UTC
Size:
2.22 KB
patch
obsolete
>diff -Naur linux-2.6.18-92.el5/drivers/usb/core/devio.c linux-2.6.18-92.el5_with_usbcore_fix/drivers/usb/core/devio.c >--- linux-2.6.18-92.el5/drivers/usb/core/devio.c 2008-06-12 14:29:38.000000000 +0000 >+++ linux-2.6.18-92.el5_with_usbcore_fix/drivers/usb/core/devio.c 2008-06-12 14:48:59.000000000 +0000 >@@ -557,6 +557,8 @@ > dev = usbdev_lookup_minor(iminor(inode)); > if (!dev) > dev = inode->i_private; >+ if (unlikely(!dev->usbdev_registered)) >+ dev = NULL; > if (!dev) { > kfree(ps); > goto out; >@@ -1588,10 +1590,12 @@ > "usbdev%d.%d", dev->bus->busnum, dev->devnum); > > dev->class_dev->class_data = dev; >+ dev->usbdev_registered = 1; > } > > static void usbdev_remove(struct usb_device *dev) > { >+ dev->usbdev_registered = 0; > class_device_unregister(dev->class_dev); > } > >diff -Naur linux-2.6.18-92.el5/drivers/usb/core/inode.c linux-2.6.18-92.el5_with_usbcore_fix/drivers/usb/core/inode.c >--- linux-2.6.18-92.el5/drivers/usb/core/inode.c 2008-06-12 14:29:35.000000000 +0000 >+++ linux-2.6.18-92.el5_with_usbcore_fix/drivers/usb/core/inode.c 2008-06-12 14:36:09.000000000 +0000 >@@ -665,8 +665,10 @@ > devuid, devgid); > if (dev->usbfs_dentry == NULL) { > err ("error creating usbfs device entry"); >+ dev->usbdev_registered = 0; > return; > } >+ dev->usbdev_registered = 1; > > /* Set the size of the device's file to be > * equal to the size of the device descriptors. */ >@@ -701,6 +703,7 @@ > kill_proc_info_as_uid(ds->discsignr, &sinfo, ds->disc_pid, ds->disc_uid, ds->disc_euid, ds->secid); > } > } >+ dev->usbdev_registered = 0; > } > > static int usbfs_notify(struct notifier_block *self, unsigned long action, void *dev) >diff -Naur linux-2.6.18-92.el5/include/linux/usb.h linux-2.6.18-92.el5_with_usbcore_fix/include/linux/usb.h >--- linux-2.6.18-92.el5/include/linux/usb.h 2008-06-12 14:29:39.000000000 +0000 >+++ linux-2.6.18-92.el5_with_usbcore_fix/include/linux/usb.h 2008-06-12 14:34:56.000000000 +0000 >@@ -351,6 +351,7 @@ > unsigned short bus_mA; /* Current available from the bus */ > u8 portnum; /* Parent port number (origin 1) */ > >+ unsigned usbdev_registered:1; /* whether the device node or usbfs entry exists */ > int have_langid; /* whether string_langid is valid */ > int string_langid; /* language ID for strings */ >
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 Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 450786
:
308923
|
309101
|
309120
|
309142
|
309305
|
309692
|
310292
|
312710
|
312722
|
313707
|
313771