Author: fireball
Date: Sun Aug 27 01:09:11 2006
New Revision: 23728
URL: http://svn.reactos.org/svn/reactos?rev=23728&view=rev
Log:
Don't crash during disconnection if a device doesn't have a driver
Modified:
trunk/reactos/drivers/usb/nt4compat/usbdriver/gendrv.c
Modified: trunk/reactos/drivers/usb/nt4compat/usbdriver/gendrv.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/usb/nt4compat/usbd…
==============================================================================
--- trunk/reactos/drivers/usb/nt4compat/usbdriver/gendrv.c (original)
+++ trunk/reactos/drivers/usb/nt4compat/usbdriver/gendrv.c Sun Aug 27 01:09:11 2006
@@ -922,6 +922,14 @@
pdrvr = pdev->dev_driver;
dev_obj = pdev->dev_obj;
}
+
+ if (dev_obj == NULL)
+ {
+ // it means no driver was found for the device and thus no device object created
+ // we just do nothing here
+ return TRUE;
+ }
+
pdrvr_ext = (PGENDRV_DRVR_EXTENSION) pdrvr->driver_ext;
pdev_ext = (PGENDRV_DEVICE_EXTENSION) dev_obj->DeviceExtension;
}
Author: ion
Date: Sat Aug 26 20:23:59 2006
New Revision: 23723
URL: http://svn.reactos.org/svn/reactos?rev=23723&view=rev
Log:
- Even though in assembly we return the BOOLEAN in all of EAX, HalBeginSystemInterrupt should, in theory, only use AL and we shouldn't make assumptions about any other bits. So chang ethe code to or al, al, instead of or eax, eax.
Modified:
trunk/reactos/ntoskrnl/ke/i386/trap.s
Modified: trunk/reactos/ntoskrnl/ke/i386/trap.s
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ke/i386/trap.s?re…
==============================================================================
--- trunk/reactos/ntoskrnl/ke/i386/trap.s (original)
+++ trunk/reactos/ntoskrnl/ke/i386/trap.s Sat Aug 26 20:23:59 2006
@@ -1326,7 +1326,7 @@
call _HalBeginSystemInterrupt@12
/* Check if it was spurious or not */
- or eax, eax
+ or al, al
jnz Handled
/* Spurious, ignore it */
@@ -1407,7 +1407,7 @@
call _HalBeginSystemInterrupt@12
/* Check if it was handled */
- or eax, eax
+ or al, al
jz SpuriousInt
/* Call the 2nd-level handler */
@@ -1444,7 +1444,7 @@
call _HalBeginSystemInterrupt@12
/* Check if it was handled */
- or eax, eax
+ or al, al
jz SpuriousInt
/* Acquire the lock */
Author: ion
Date: Sat Aug 26 20:07:31 2006
New Revision: 23722
URL: http://svn.reactos.org/svn/reactos?rev=23722&view=rev
Log:
- Remove useless stack operations in KiInterruptDispatch that I used for debugging.
Modified:
trunk/reactos/ntoskrnl/ke/i386/trap.s
Modified: trunk/reactos/ntoskrnl/ke/i386/trap.s
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ke/i386/trap.s?re…
==============================================================================
--- trunk/reactos/ntoskrnl/ke/i386/trap.s (original)
+++ trunk/reactos/ntoskrnl/ke/i386/trap.s Sat Aug 26 20:07:31 2006
@@ -1446,7 +1446,6 @@
/* Check if it was handled */
or eax, eax
jz SpuriousInt
- sub esp, 12
/* Acquire the lock */
GetIntLock:
@@ -1462,9 +1461,6 @@
/* Release the lock */
RELEASE_SPINLOCK(esi)
- /* Clean up the stack */
- add esp, 12
-
/* Exit the interrupt */
mov esi, $
cli