summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael S. Tsirkin <mst@redhat.com>2018-01-26 02:36:44 +0300
committerDavid S. Miller <davem@davemloft.net>2018-01-29 20:02:55 +0300
commit491847f3b29cef0417a03142b96e2a6dea81cca0 (patch)
tree68e92d489b96c65ef2fe4a662d615d9400af3635
parentb4eab7de6685ee2691a7e297d511a126dbf53207 (diff)
downloadlinux-491847f3b29cef0417a03142b96e2a6dea81cca0.tar.xz
tools/virtio: fix smp_mb on x86
Offset 128 overlaps the last word of the redzone. Use 132 which is always beyond that. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--tools/virtio/ringtest/main.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/virtio/ringtest/main.h b/tools/virtio/ringtest/main.h
index 593a3289c87d..301d59bfcd0a 100644
--- a/tools/virtio/ringtest/main.h
+++ b/tools/virtio/ringtest/main.h
@@ -111,7 +111,7 @@ static inline void busy_wait(void)
}
#if defined(__x86_64__) || defined(__i386__)
-#define smp_mb() asm volatile("lock; addl $0,-128(%%rsp)" ::: "memory", "cc")
+#define smp_mb() asm volatile("lock; addl $0,-132(%%rsp)" ::: "memory", "cc")
#else
/*
* Not using __ATOMIC_SEQ_CST since gcc docs say they are only synchronized