- Create an empty TRANSPORT_ADDRESS for the local address when doing an implicit bind so TCP/IP can choose its own local port and address instead of trying to bind the remote address and port
- Fixes another critical networking bug
svn path=/trunk/; revision=52092
- Add a Next member to CONNECTION_ENDPOINT to allow multiple connections to be associated with a single address file while not overwriting pointers, dereferencing other people's connection objects, and causing horrific amounts of memory corruption
- Add several sanity checks to prevent this from happening again
- Don't try dereference address files and connection endpoints in the free functions; there should be none associated since r52083 (sanity checks ensure this)
- Don't hold an extra reference to the address file when creating a listener; this reference is implicit
- This should greatly increase reliability of activities that open lots of sockets such as web browsing and running servers on ROS
- This also fixes most issues of not releasing a server port when the listener is closed
svn path=/trunk/; revision=52086
- add definition for KeMemoryBarrierWithoutFence
- add x64 version of KeMemoryBarrier and some related defines
- Use KeMemoryBarrierWithoutFence in spinlocks as suggested by Alex
svn path=/trunk/; revision=52079
- Add explicit memory barriers to KxAcquireSpinLock, KxReleaseSpinLock inline functions and KeTryToAcquireQueuedSpinLock, KeTryToAcquireQueuedSpinLockRaiseToSynch in the UP case. This will prevent the compiler from reordering memory access instructions across the boundaries of these functions, even when being inlined.
- Use the inline functions in x64 spinlock functions, too
svn path=/trunk/; revision=52078
Hackfix to r52065:
- Comment out call to IopDecrementDeviceObjectRef in IopLoadFileSystemDriver, on Pierre's request. Needs more research. Should fix boot and testcd ASSERT in 2nd stage.
svn path=/trunk/; revision=52075
Fixes to r52065:
- Acquire resources within a critical region
- Simplified IoEnumerateRegisteredFiltersList and made its behaviour match the one described in MSDN: http://msdn.microsoft.com/en-us/library/ff548348%28v=vs.85%29.aspx
This was brought to you by Alex Ionescu.
svn path=/trunk/; revision=52073
- Fix a bug in device removal which resulted in an IRP_MN_CANCEL_REMOVE_DEVICE request not being sent if the initial IRP_MN_QUERY_REMOVE_DEVICE failed
svn path=/trunk/; revision=52066
- renamed Io volumes global to match Windows names (in case of debug)
- renamed IopDereferenceVpb() to IopDereferenceVpbAndFree(), IopReferenceVpbForVerify() to IopReferenceVerifyVpb(), IopInitializeVpbForMount() to IopMountInitializeVpb(), IopLoadFileSystem() to IopLoadFileSystemDriver()
- implemented IopDecrementDeviceObjectHandleCount(), IopInterlockedIncrementUlong(), IopInterlockedDecrementUlong(), IopNotifyAlreadyRegisteredFileSystems() and IoEnumerateRegisteredFiltersList()
- halfplemented IopDecrementDeviceObjectRef()
- implemented check for already registrered notification in IoRegisterFsRegistrationChange()
- implemented sending notifications for already registered drivers to registrant in IoRegisterFsRegistrationChange()
- implemented VPB freeing in IopDereferenceVpbAndFree()
- acquire Io volumes lists once and forever for system shutdown, instead of keeping acquiring and releasing
- reference device object in IopShutdownBaseFileSystems() before sending it the shutdown IRP. To ensure to keep it valid till the end
- added a FS driver registration operations counter
- use this counter to handle failed mounts
- fixed: release locks before calling driver for mounting and reacquire them after
- fixed check for boot partition failure (and associated bugcheck): check we are in boot phase 0 or 1
- simplified lock process by using only one lock (ie removed mutex). Also use only critical region where needed
- fixed: ensure that locks are properly released when quitting a function
- fixed wrong return in IopCreateVpb()
- minor fixes around
svn path=/trunk/; revision=52065
- Reset KdbNumberOfRowsPrinted and KdbNumberOfColsPrinted before reading new command in kernel debugger so if previous command printed nearly full page, new command won't show "Press q to abort" message before processing
svn path=/trunk/; revision=52064
"According to gcc doc, if header.h is precompiled, the output should be named "header.h.gch" and not anything else."
Knowing it was the first step before actually doing it :-/
svn path=/trunk/; revision=52061
fix pch support, with proper dependancies.
Use cmake built-in functions instead of doing weird "magic" with tabs and spaces.
According to gcc doc, if header.h is precompiled, the output should be named "header.h.gch" and not anything else.
svn path=/trunk/; revision=52058
Merge r52051 and r52052 from cmake branch:
* Improve static libs creation in *nix. Dedicated to arty.
* Add a missing dependency.
svn path=/trunk/; revision=52053
Merge r52027 from cmake branch:
* Several improvements to debug symbols handling.
* A new (killer/awesome/...etc) feature has been introduced to kdbg: argument values support. Now backtraces contain not only usermode and kernelmode addresses translated, but also the argument values passed to the functions along the trace.
* Brought to you by the Arty.
* works only with cmake builds
svn path=/trunk/; revision=52050
replace FILE IO with Memory IO functions for batch files
Patch by HansH (hans at atbas dot org)
See issue #5807 for more details.
svn path=/trunk/; revision=52047
- Massive rework of device removal
- IRP_MN_QUERY_REMOVE_DEVICE is sent to all devices that will be removed in response to a removal/ejection
- If any of the IRP_MN_QUERY_REMOVE_DEVICE requests fail, all devices which received a IRP_MN_QUERY_REMOVE_DEVICE will receive IRP_MN_CANCEL_REMOVE_DEVICE
- If everything approves the remove request, IRP_MN_REMOVE_DEVICE will be sent to children, ejection and/or removal relations, and finally the device itself
- Handle removal relations for all devices not just 1st level devices
- Remove child devices before removing the parent
- Move GUID_DEVICE_REMOVE_PENDING and GUID_DEVICE_REMOVAL_VETOED notifications to IopQueryRemoveDevice
- Implement IopCancelRemoveDevice which sends IRP_MN_CANCEL_REMOVE_DEVICE to the driver stack and sends GUID_TARGET_DEVICE_REMOVE_CANCELLED to any drivers waiting on target device change
- Use the IopRemoveDevice function to remove devices instead of calling IopQueryRemoveDevice and IopSendRemoveDevice manually so removal and/or ejection relations and children are processed
- IRPs and PnP notifications sent upon device removal (surprise and safe) should now be compatible with XP/Vista/7
svn path=/trunk/; revision=52046
- Use tags when allocation and freeing memory and define them in tag.h
- Fix some wrongly used tags when freeing
- Our new memory manager doesn't check tags when ExFreePoolWithTag is used. It will be fixed after testing
svn path=/trunk/; revision=52043
in _flsbuf, always reset _cnt to 0 and don't allocate/use a buffer when _IONBUF is set. Fixes a regression in msvcrt_winetest file.
See issue #5829 for more details.
svn path=/trunk/; revision=52040
- Fix bug in PnpRegSzToString. The caller expects the result length to be the length of the string in bytes, not the string length
- Introduced in rev 46690
svn path=/trunk/; revision=52037
- Remove the device node when the device object is destroyed to prevent PnP manager from crashing when manipulating device nodes with device objects that no longer exist
- Move removal notifications into IopRemoveDevice and call it from IopPrepareDeviceForRemoval and IoRequestDeviceEject to manage all of the removal relations for each device removed
svn path=/trunk/; revision=52034
- Fix a bug in device removal and ejection which caused the request to fail when EjectionRelations or RemovalRelations was not handled by a driver in the stack
svn path=/trunk/; revision=52033