Module Name:    src
Committed By:   riastradh
Date:           Sat Feb 25 00:33:04 UTC 2023

Modified Files:
        src/sys/arch/xen/xen: xbd_xenbus.c

Log Message:
xbd(4): Membar audit.

After consuming slots, must issue xen_wmb before notifying the other
side that we've consumed them in RING_FINAL_CHECK_FOR_RESPONSES.


To generate a diff of this commit:
cvs rdiff -u -r1.129 -r1.130 src/sys/arch/xen/xen/xbd_xenbus.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/xen/xen/xbd_xenbus.c
diff -u src/sys/arch/xen/xen/xbd_xenbus.c:1.129 src/sys/arch/xen/xen/xbd_xenbus.c:1.130
--- src/sys/arch/xen/xen/xbd_xenbus.c:1.129	Mon Jul 13 21:21:56 2020
+++ src/sys/arch/xen/xen/xbd_xenbus.c	Sat Feb 25 00:33:03 2023
@@ -1,4 +1,4 @@
-/*      $NetBSD: xbd_xenbus.c,v 1.129 2020/07/13 21:21:56 jdolecek Exp $      */
+/*      $NetBSD: xbd_xenbus.c,v 1.130 2023/02/25 00:33:03 riastradh Exp $      */
 
 /*
  * Copyright (c) 2006 Manuel Bouyer.
@@ -50,7 +50,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: xbd_xenbus.c,v 1.129 2020/07/13 21:21:56 jdolecek Exp $");
+__KERNEL_RCSID(0, "$NetBSD: xbd_xenbus.c,v 1.130 2023/02/25 00:33:03 riastradh Exp $");
 
 #include "opt_xen.h"
 
@@ -905,10 +905,9 @@ again:
 		}
 		SLIST_INSERT_HEAD(&sc->sc_xbdreq_head, xbdreq, req_next);
 	}
-
-	xen_rmb();
 	sc->sc_ring.rsp_cons = i;
 
+	xen_wmb();
 	RING_FINAL_CHECK_FOR_RESPONSES(&sc->sc_ring, more_to_do);
 	if (more_to_do)
 		goto again;

Reply via email to