]> xenbits.xensource.com Git - people/liuw/xen.git/commitdiff
x86/shim: copy back the result of EVTCHNOP_status
authorRoger Pau Monne <roger.pau@citrix.com>
Thu, 31 Oct 2019 11:58:29 +0000 (12:58 +0100)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Fri, 1 Nov 2019 10:48:04 +0000 (10:48 +0000)
The event channel data was not copied back to guest memory, fix this
by doing the copy.

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Reviewed-by: Wei Liu <wl@xen.org>
Release-acked-by: Juergen Gross <jgross@suse.com>
xen/arch/x86/pv/shim.c

index 4329eaaefe722c9c15d28570db74ee4893d7a722..35bf3945ac40533d435e7bd8f2641e49bce707c9 100644 (file)
@@ -514,6 +514,9 @@ static long pv_shim_event_channel_op(int cmd, XEN_GUEST_HANDLE_PARAM(void) arg)
         else
             rc = xen_hypercall_event_channel_op(EVTCHNOP_status, &status);
 
+        if ( !rc && __copy_to_guest(arg, &status, 1) )
+            rc = -EFAULT;
+
         break;
     }