FreeBSD Bugzilla – Attachment 206707 Details for
Bug 239973
Kernel Panic: device_get_ivars(9) returns NULL which leads to Null pointer dereference for multiple drivers
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
proposed patch diff for 5 drivers mentioned in the bug
patch_5_driver_r350580.diff (text/plain), 2.14 KB, created by
Neeraj
on 2019-08-19 19:52:47 UTC
(
hide
)
Description:
proposed patch diff for 5 drivers mentioned in the bug
Filename:
MIME Type:
Creator:
Neeraj
Created:
2019-08-19 19:52:47 UTC
Size:
2.14 KB
patch
obsolete
>diff -ruN freebsd_orig/sys/dev/usb/input/uhid.c freebsd_13/sys/dev/usb/input/uhid.c >--- freebsd_orig/sys/dev/usb/input/uhid.c 2019-08-05 09:46:11.170388578 +0530 >+++ freebsd_13/sys/dev/usb/input/uhid.c 2019-08-05 10:28:45.305146412 +0530 >@@ -677,6 +677,9 @@ > int error; > void *buf; > uint16_t len; >+ >+ if (uaa == NULL) >+ return (ENXIO); > > DPRINTFN(11, "\n"); > >diff -ruN freebsd_orig/sys/dev/usb/storage/umass.c freebsd_13/sys/dev/usb/storage/umass.c >--- freebsd_orig/sys/dev/usb/storage/umass.c 2019-08-05 10:13:33.378982245 +0530 >+++ freebsd_13/sys/dev/usb/storage/umass.c 2019-08-05 09:36:58.339765496 +0530 >@@ -872,6 +872,9 @@ > struct usb_attach_arg *uaa = device_get_ivars(dev); > struct umass_probe_proto temp; > >+ if (uaa == NULL) >+ return (ENXIO); >+ > if (uaa->usb_mode != USB_MODE_HOST) { > return (ENXIO); > } >diff -ruN freebsd_orig/sys/dev/usb/usb_hub.c freebsd_13/sys/dev/usb/usb_hub.c >--- freebsd_orig/sys/dev/usb/usb_hub.c 2019-08-05 10:25:57.276874204 +0530 >+++ freebsd_13/sys/dev/usb/usb_hub.c 2019-08-05 08:18:08.537617812 +0530 >@@ -1111,6 +1111,9 @@ > { > struct usb_attach_arg *uaa = device_get_ivars(dev); > >+ if (uaa == NULL) >+ return (ENXIO); >+ > if (uaa->usb_mode != USB_MODE_HOST) > return (ENXIO); > >diff -ruN freebsd_orig/sys/dev/usb/wlan/if_run.c freebsd_13/sys/dev/usb/wlan/if_run.c >--- freebsd_orig/sys/dev/usb/wlan/if_run.c 2019-08-05 10:13:33.398982487 +0530 >+++ freebsd_13/sys/dev/usb/wlan/if_run.c 2019-08-05 09:36:08.982716789 +0530 >@@ -720,6 +720,8 @@ > { > struct usb_attach_arg *uaa = device_get_ivars(self); > >+ if (uaa == NULL) >+ return (ENXIO); > if (uaa->usb_mode != USB_MODE_HOST) > return (ENXIO); > if (uaa->info.bConfigIndex != 0) >diff -ruN freebsd_orig/sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c freebsd_13/sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c >--- freebsd_orig/sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c 2019-08-05 10:13:33.318981516 +0530 >+++ freebsd_13/sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c 2019-08-05 09:33:46.941575792 +0530 >@@ -513,6 +513,9 @@ > struct usb_attach_arg *uaa = device_get_ivars(dev); > int error; > >+ if (uaa == NULL) >+ return (ENXIO); >+ > if (uaa->usb_mode != USB_MODE_HOST) > return (ENXIO); >
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 239973
:
206706
| 206707