From 19e01cf0ed8b9ad811a5f4d1befe3f0c0d6a0fa0 Mon Sep 17 00:00:00 2001 From: Andrew Yang <30510259+AndrewYangMSFT@users.noreply.github.com> Date: Wed, 22 Jan 2025 11:18:18 -0800 Subject: [PATCH] Use helper function ReadNoFence() to read instead --- serial/VirtualSerial2/queue.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/serial/VirtualSerial2/queue.c b/serial/VirtualSerial2/queue.c index ac763bd96..371ef6936 100644 --- a/serial/VirtualSerial2/queue.c +++ b/serial/VirtualSerial2/queue.c @@ -717,7 +717,7 @@ QueueProcessGetLineControl( // // Take a snapshot of the line control register variable // - lineControlSnapshot = *lineControlRegister; + lineControlSnapshot = ReadNoFence((LONG *)lineControlRegister); // // Decode the word length @@ -801,7 +801,7 @@ QueueProcessSetLineControl( NTSTATUS status; PDEVICE_CONTEXT deviceContext; SERIAL_LINE_CONTROL lineControl = {0}; - volatile ULONG* lineControlRegister; + ULONG *lineControlRegister; UCHAR lineControlData = 0; UCHAR lineControlStop = 0; UCHAR lineControlParity = 0; @@ -946,7 +946,7 @@ QueueProcessSetLineControl( #endif } - lineControlSnapshot = *lineControlRegister; + lineControlSnapshot = ReadNoFence((LONG *)lineControlRegister); lineControlNew = (lineControlSnapshot & SERIAL_LCR_BREAK) | (lineControlData | lineControlParity | lineControlStop);