Skip to content

Commit

Permalink
- Added fix for bluescreen bugs in Dokan
Browse files Browse the repository at this point in the history
  • Loading branch information
caschulz88 committed Oct 22, 2014
1 parent 2c4fe3d commit a7a8b58
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions sys/create.c
Original file line number Diff line number Diff line change
Expand Up @@ -149,10 +149,10 @@ DokanGetFCB(
ExFreePool(FileName);
}

InterlockedIncrement(&fcb->FileCount);
ExReleaseResourceLite(&Vcb->Resource);
KeLeaveCriticalRegion();

InterlockedIncrement(&fcb->FileCount);
return fcb;
}

Expand All @@ -173,7 +173,7 @@ DokanFreeFCB(
ExAcquireResourceExclusiveLite(&vcb->Resource, TRUE);
ExAcquireResourceExclusiveLite(&Fcb->Resource, TRUE);

Fcb->FileCount--;
InterlockedDecrement(&Fcb->FileCount);

if (Fcb->FileCount == 0) {

Expand Down
3 changes: 2 additions & 1 deletion sys/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ with this program. If not, see <http://www.gnu.org/licenses/>.
#include <mountmgr.h>
#include <ntddstor.h>

static UNICODE_STRING sddl = RTL_CONSTANT_STRING(L"D:P(A;;GA;;;SY)(A;;GRGWGX;;;BA)(A;;GRGWGX;;;WD)(A;;GRGX;;;RC)");

NTSTATUS
DokanSendIoContlToMountManager(
Expand Down Expand Up @@ -292,7 +293,7 @@ DokanCreateGlobalDiskDevice(
FILE_DEVICE_UNKNOWN,// DeviceType
0, // DeviceCharacteristics
FALSE, // Not Exclusive
&SDDL_DEVOBJ_SYS_ALL_ADM_RWX_WORLD_RW_RES_R, // Default SDDL String
&SDDL_DEVOBJ_SYS_ALL_ADM_RWX_WORLD_RW_RES_R, // Edited SDDL string
NULL, // Device Class GUID
&deviceObject); // DeviceObject

Expand Down

0 comments on commit a7a8b58

Please sign in to comment.