Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: usbopen page fault



arto.huusko%pp2.inet.fi@localhost said:
> the instruction is cmpb $0x1, 0x30(%rax). show registers in ddb shows
> rax is 0

Seems that I accidentally removed some error handling
(which was hidden in a macro).
The appended patch should fix it.

sorry
Matthias





-------------------------------------------------------------------
-------------------------------------------------------------------
Forschungszentrum Juelich GmbH
52425 Juelich

Sitz der Gesellschaft: Juelich
Eingetragen im Handelsregister des Amtsgerichts Dueren Nr. HR B 3498
Vorsitzende des Aufsichtsrats: MinDir'in Baerbel Brumme-Bothe
Geschaeftsfuehrung: Prof. Dr. Achim Bachem (Vorsitzender),
Dr. Ulrich Krafft (stellv. Vorsitzender), Prof. Dr. Harald Bolt,
Dr. Sebastian M. Schmidt
-------------------------------------------------------------------
-------------------------------------------------------------------
#
# old_revision [c3ee9a0b3a32acdfc85389aae00fee53b1fbc0b5]
#
# patch "sys/dev/usb/usb.c"
#  from [bfc818094e58b2a4dfab02179ba02037063c44b1]
#    to [644b66799a3f0b062cf29f42d5f393ab2097b075]
#
============================================================
--- sys/dev/usb/usb.c   bfc818094e58b2a4dfab02179ba02037063c44b1
+++ sys/dev/usb/usb.c   644b66799a3f0b062cf29f42d5f393ab2097b075
@@ -455,6 +455,8 @@ usbopen(dev_t dev, int flag, int mode, s
        }
 
        sc = device_lookup_private(&usb_cd, unit);
+       if (!sc)
+               return (ENXIO);
 
        if (sc->sc_dying)
                return (EIO);


Home | Main Index | Thread Index | Old Index