]> xenbits.xensource.com Git - pvdrivers/win/xenbus.git/commitdiff
GnttabQueryReference() incorrectly checks for GTF_readonly
authorPaul Durrant <pdurrant@amazon.com>
Mon, 25 May 2020 11:08:02 +0000 (12:08 +0100)
committerPaul Durrant <pdurrant@amazon.com>
Mon, 25 May 2020 11:08:02 +0000 (12:08 +0100)
GTF_readonly should be checked in the 'flags' field, not 'frame'. This patch
fixes the issue.

Reported-by: Connor Davis <connojd@protonmail.com>
Signed-off-by: Paul Durrant <pdurrant@amazon.com>
src/xenbus/gnttab.c

index e590a5c9a29b02b774b498f12eaf9c891f009a5e..3fe52aacf7ab73d8334e682c15a98f30ed56c17e 100644 (file)
@@ -587,7 +587,7 @@ GnttabQueryReference(
         *Pfn = Context->Table[Reference].frame;
 
     if (ReadOnly != NULL)
-        *ReadOnly = (Context->Table[Reference].frame & GTF_readonly) ? TRUE : FALSE;
+        *ReadOnly = (Context->Table[Reference].flags & GTF_readonly) ? TRUE : FALSE;
 
     return STATUS_SUCCESS;