Author: tkreuzer Date: Sun Mar 1 16:33:43 2015 New Revision: 66525
URL: http://svn.reactos.org/svn/reactos?rev=66525&view=rev Log: [NTOSKRNL] Add some _SEH2_VOLATILE and a comment about memory barriers
Modified: trunk/reactos/ntoskrnl/fsrtl/notify.c trunk/reactos/ntoskrnl/ob/oblife.c
Modified: trunk/reactos/ntoskrnl/fsrtl/notify.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/fsrtl/notify.c?rev... ============================================================================== --- trunk/reactos/ntoskrnl/fsrtl/notify.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/fsrtl/notify.c [iso-8859-1] Sun Mar 1 16:33:43 2015 @@ -85,7 +85,7 @@ PIO_STACK_LOCATION Stack; PNOTIFY_CHANGE NotifyChange; PREAL_NOTIFY_SYNC RealNotifySync; - PSECURITY_SUBJECT_CONTEXT SubjectContext = NULL; + PSECURITY_SUBJECT_CONTEXT _SEH2_VOLATILE SubjectContext = NULL;
/* Get the NOTIFY_CHANGE struct and reset it */ NotifyChange = (PNOTIFY_CHANGE)Irp->IoStatus.Information; @@ -559,7 +559,7 @@ * @implemented * * Lets FSD know if changes occures in the specified directory. - * Directory will be reenumerated. + * Directory will be reenumerated. * * @param NotifySync * Synchronization object pointer @@ -568,7 +568,7 @@ * Used to identify the notify structure * * @param FullDirectoryName - * String (A or W) containing the full directory name + * String (A or W) containing the full directory name * * @param NotifyList * Notify list pointer (to head) @@ -620,7 +620,7 @@ * Synchronization object pointer * * @param NotifyList - * Notify list pointer (to head) + * Notify list pointer (to head) * * @param FsContext * Used to identify the notify structure @@ -638,7 +638,7 @@ { PNOTIFY_CHANGE NotifyChange; PREAL_NOTIFY_SYNC RealNotifySync; - PSECURITY_SUBJECT_CONTEXT SubjectContext = NULL; + PSECURITY_SUBJECT_CONTEXT _SEH2_VOLATILE SubjectContext = NULL;
/* Get real structure hidden behind the opaque pointer */ RealNotifySync = (PREAL_NOTIFY_SYNC)NotifySync; @@ -1337,7 +1337,7 @@ { if (PoolQuotaCharged) { - PsReturnProcessPagedPoolQuota(NotifyChange->OwningProcess, NumberOfBytes); + PsReturnProcessPagedPoolQuota(NotifyChange->OwningProcess, NumberOfBytes); } NotifyChange->Flags |= NOTIFY_IMMEDIATELY; } @@ -1413,19 +1413,19 @@ * @name FsRtlNotifyFullChangeDirectory * @implemented * - * Lets FSD know if changes occures in the specified directory. + * Lets FSD know if changes occures in the specified directory. * * @param NotifySync * Synchronization object pointer * * @param NotifyList - * Notify list pointer (to head) + * Notify list pointer (to head) * * @param FsContext * Used to identify the notify structure * * @param FullDirectoryName - * String (A or W) containing the full directory name + * String (A or W) containing the full directory name * * @param WatchTree * True to notify changes in subdirectories too @@ -1489,13 +1489,13 @@ * Synchronization object pointer * * @param NotifyList - * Notify list pointer (to head) + * Notify list pointer (to head) * * @param FullTargetName * String (A or W) containing the full directory name that changed * * @param TargetNameOffset - * Offset, in FullTargetName, of the final component that is in the changed directory + * Offset, in FullTargetName, of the final component that is in the changed directory * * @param StreamName * String (A or W) containing a stream name @@ -1563,7 +1563,7 @@ PREAL_NOTIFY_SYNC RealNotifySync;
*NotifySync = NULL; - + RealNotifySync = ExAllocatePoolWithTag(NonPagedPool | POOL_RAISE_IF_ALLOCATION_FAILURE, sizeof(REAL_NOTIFY_SYNC), 'FSNS'); ExInitializeFastMutex(&(RealNotifySync->FastMutex)); @@ -1583,7 +1583,7 @@ * Synchronization object pointer * * @param NotifyList - * Notify list pointer (to head) + * Notify list pointer (to head) * * @param FullTargetName * String (A or W) containing the full directory name that changed @@ -1616,7 +1616,7 @@ FilterMatch, 0, NULL, - NULL); + NULL); }
/*++
Modified: trunk/reactos/ntoskrnl/ob/oblife.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ob/oblife.c?rev=66... ============================================================================== --- trunk/reactos/ntoskrnl/ob/oblife.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/ob/oblife.c [iso-8859-1] Sun Mar 1 16:33:43 2015 @@ -370,7 +370,7 @@ { NTSTATUS Status = STATUS_SUCCESS; ULONG StringLength; - PWCHAR StringBuffer = NULL; + PWCHAR _SEH2_VOLATILE StringBuffer = NULL; UNICODE_STRING LocalName; PAGED_CODE();
@@ -491,7 +491,8 @@ /* Check if we have a security descriptor */ if (SecurityDescriptor) { - /* Capture it */ + /* Capture it. Note: This has an implicit memory barrier due + to the function call, so cleanup is safe here.) */ Status = SeCaptureSecurityDescriptor(SecurityDescriptor, AccessMode, NonPagedPool,