FreeBSD Bugzilla – Attachment 7512 Details for
Bug 16256
USB stack panic on null pointer dereference
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
file.diff
file.diff (text/plain), 1.87 KB, created by
Louis Mamakos
on 2000-01-21 15:40:01 UTC
(
hide
)
Description:
file.diff
Filename:
MIME Type:
Creator:
Louis Mamakos
Created:
2000-01-21 15:40:01 UTC
Size:
1.87 KB
patch
obsolete
>Index: ugen.c >=================================================================== >RCS file: /usr/local/FreeBSD/cvs/src/sys/dev/usb/ugen.c,v >retrieving revision 1.33 >diff -u -r1.33 ugen.c >--- ugen.c 2000/01/20 22:05:30 1.33 >+++ ugen.c 2000/01/21 15:28:15 >@@ -435,16 +435,15 @@ > if (endpt == USB_CONTROL_ENDPOINT) > return (ENODEV); > >-#ifdef DIAGNOSTIC > if (sce->edesc == NULL) { > printf("ugenread: no edesc\n"); > return (EIO); > } >+ > if (sce->pipeh == NULL) { > printf("ugenread: no pipe\n"); > return (EIO); > } >-#endif > > switch (sce->edesc->bmAttributes & UE_XFERTYPE) { > case UE_INTERRUPT: >@@ -559,7 +558,6 @@ > if (endpt == USB_CONTROL_ENDPOINT) > return (ENODEV); > >-#ifdef DIAGNOSTIC > if (sce->edesc == NULL) { > printf("ugenwrite: no edesc\n"); > return (EIO); >@@ -568,7 +566,6 @@ > printf("ugenwrite: no pipe\n"); > return (EIO); > } >-#endif > > switch (sce->edesc->bmAttributes & UE_XFERTYPE) { > case UE_BULK: >@@ -897,12 +894,12 @@ > sce = &sc->sc_endpoints[endpt][IN]; > if (sce == NULL) > return (EINVAL); >-#ifdef DIAGNOSTIC >+ > if (sce->pipeh == NULL) { > printf("ugenioctl: USB_SET_SHORT_XFER, no pipe\n"); > return (EIO); > } >-#endif >+ > if (*(int *)addr) > sce->state |= UGEN_SHORT_OK; > else >@@ -912,12 +909,12 @@ > sce = &sc->sc_endpoints[endpt][IN]; > if (sce == NULL) > return (EINVAL); >-#ifdef DIAGNOSTIC >+ > if (sce->pipeh == NULL) { > printf("ugenioctl: USB_SET_TIMEOUT, no pipe\n"); > return (EIO); > } >-#endif >+ > sce->timeout = *(int *)addr; > return (0); > default: >@@ -1177,7 +1174,7 @@ > sce = &sc->sc_endpoints[UGENENDPOINT(dev)][IN]; > if (sce == NULL) > return (EINVAL); >-#ifdef DIAGNOSTIC >+ > if (!sce->edesc) { > printf("ugenwrite: no edesc\n"); > return (EIO); >@@ -1186,7 +1183,7 @@ > printf("ugenpoll: no pipe\n"); > return (EIO); > } >-#endif >+ > s = splusb(); > switch (sce->edesc->bmAttributes & UE_XFERTYPE) { > case UE_INTERRUPT:
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 16256
: 7512