[NTOSKRNL]

Add some _SEH2_VOLATILE and a comment about memory barriers

svn path=/trunk/; revision=66525
This commit is contained in:
Timo Kreuzer 2015-03-01 16:33:43 +00:00
parent b95eb87486
commit 400b4d9289
2 changed files with 17 additions and 16 deletions

View file

@ -85,7 +85,7 @@ FsRtlCancelNotify(IN PDEVICE_OBJECT DeviceObject,
PIO_STACK_LOCATION Stack; PIO_STACK_LOCATION Stack;
PNOTIFY_CHANGE NotifyChange; PNOTIFY_CHANGE NotifyChange;
PREAL_NOTIFY_SYNC RealNotifySync; PREAL_NOTIFY_SYNC RealNotifySync;
PSECURITY_SUBJECT_CONTEXT SubjectContext = NULL; PSECURITY_SUBJECT_CONTEXT _SEH2_VOLATILE SubjectContext = NULL;
/* Get the NOTIFY_CHANGE struct and reset it */ /* Get the NOTIFY_CHANGE struct and reset it */
NotifyChange = (PNOTIFY_CHANGE)Irp->IoStatus.Information; NotifyChange = (PNOTIFY_CHANGE)Irp->IoStatus.Information;
@ -638,7 +638,7 @@ FsRtlNotifyCleanup(IN PNOTIFY_SYNC NotifySync,
{ {
PNOTIFY_CHANGE NotifyChange; PNOTIFY_CHANGE NotifyChange;
PREAL_NOTIFY_SYNC RealNotifySync; PREAL_NOTIFY_SYNC RealNotifySync;
PSECURITY_SUBJECT_CONTEXT SubjectContext = NULL; PSECURITY_SUBJECT_CONTEXT _SEH2_VOLATILE SubjectContext = NULL;
/* Get real structure hidden behind the opaque pointer */ /* Get real structure hidden behind the opaque pointer */
RealNotifySync = (PREAL_NOTIFY_SYNC)NotifySync; RealNotifySync = (PREAL_NOTIFY_SYNC)NotifySync;

View file

@ -370,7 +370,7 @@ ObpCaptureObjectName(IN OUT PUNICODE_STRING CapturedName,
{ {
NTSTATUS Status = STATUS_SUCCESS; NTSTATUS Status = STATUS_SUCCESS;
ULONG StringLength; ULONG StringLength;
PWCHAR StringBuffer = NULL; PWCHAR _SEH2_VOLATILE StringBuffer = NULL;
UNICODE_STRING LocalName; UNICODE_STRING LocalName;
PAGED_CODE(); PAGED_CODE();
@ -491,7 +491,8 @@ ObpCaptureObjectCreateInformation(IN POBJECT_ATTRIBUTES ObjectAttributes,
/* Check if we have a security descriptor */ /* Check if we have a security descriptor */
if (SecurityDescriptor) 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, Status = SeCaptureSecurityDescriptor(SecurityDescriptor,
AccessMode, AccessMode,
NonPagedPool, NonPagedPool,