FreeBSD Bugzilla – Attachment 18860 Details for
Bug 33712
Duplicate make_dev panic in ugen.c + patch
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
file.diff
file.diff (text/plain), 2.04 KB, created by
ak03
on 2002-01-08 23:20:01 UTC
(
hide
)
Description:
file.diff
Filename:
MIME Type:
Creator:
ak03
Created:
2002-01-08 23:20:01 UTC
Size:
2.04 KB
patch
obsolete
>Index: ugen.c >=================================================================== >RCS file: /usr/ncvs/src/sys/dev/usb/ugen.c,v >retrieving revision 1.56 >diff -u -r1.56 ugen.c >--- ugen.c 2 Jan 2002 23:31:08 -0000 1.56 >+++ ugen.c 8 Jan 2002 22:52:44 -0000 >@@ -202,11 +202,6 @@ > > sc->sc_udev = udev = uaa->device; > >-#if defined(__FreeBSD__) >- /* the main device, ctrl endpoint */ >- make_dev(&ugen_cdevsw, UGENMINOR(USBDEVUNIT(sc->sc_dev), 0), >- UID_ROOT, GID_OPERATOR, 0644, "%s", USBDEVNAME(sc->sc_dev)); >-#endif > memset(sc->sc_endpoints, 0, sizeof sc->sc_endpoints); > > /* First set configuration index 0, the default one for ugen. */ >@@ -237,6 +232,10 @@ > { > int endptno; > >+ /* the main device, ctrl endpoint */ >+ make_dev(&ugen_cdevsw, UGENMINOR(USBDEVUNIT(sc->sc_dev), 0), >+ UID_ROOT, GID_OPERATOR, 0644, "%s", USBDEVNAME(sc->sc_dev)); >+ > for (endptno = 1; endptno < USB_MAX_ENDPOINTS; endptno++) { > if (sc->sc_endpoints[endptno][IN].sc != NULL || > sc->sc_endpoints[endptno][OUT].sc != NULL ) { >@@ -264,6 +263,13 @@ > dev_t dev; > struct vnode *vp; > >+ /* destroy the device for the control endpoint */ >+ dev = makedev(UGEN_CDEV_MAJOR, UGENMINOR(USBDEVUNIT(sc->sc_dev), 0)); >+ vp = SLIST_FIRST(&dev->si_hlist); >+ if (vp) >+ VOP_REVOKE(vp, REVOKEALL); >+ destroy_dev(dev); >+ > /* destroy all devices for the other (existing) endpoints as well */ > for (endptno = 1; endptno < USB_MAX_ENDPOINTS; endptno++) { > if (sc->sc_endpoints[endptno][IN].sc != NULL || >@@ -816,9 +822,6 @@ > int s; > #if defined(__NetBSD__) || defined(__OpenBSD__) > int maj, mn; >-#elif defined(__FreeBSD__) >- dev_t dev; >- struct vnode *vp; > #endif > > #if defined(__NetBSD__) || defined(__OpenBSD__) >@@ -857,12 +860,6 @@ > mn = self->dv_unit * USB_MAX_ENDPOINTS; > vdevgone(maj, mn, mn + USB_MAX_ENDPOINTS - 1, VCHR); > #elif defined(__FreeBSD__) >- /* destroy the device for the control endpoint */ >- dev = makedev(UGEN_CDEV_MAJOR, UGENMINOR(USBDEVUNIT(sc->sc_dev), 0)); >- vp = SLIST_FIRST(&dev->si_hlist); >- if (vp) >- VOP_REVOKE(vp, REVOKEALL); >- destroy_dev(dev); > ugen_destroy_devnodes(sc); > #endif
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 33712
: 18860