Skip to content

Commit 491847f

Browse files
mstsirkindavem330
authored andcommitted
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 <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent b4eab7d commit 491847f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tools/virtio/ringtest/main.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ static inline void busy_wait(void)
111111
}
112112

113113
#if defined(__x86_64__) || defined(__i386__)
114-
#define smp_mb() asm volatile("lock; addl $0,-128(%%rsp)" ::: "memory", "cc")
114+
#define smp_mb() asm volatile("lock; addl $0,-132(%%rsp)" ::: "memory", "cc")
115115
#else
116116
/*
117117
* Not using __ATOMIC_SEQ_CST since gcc docs say they are only synchronized

0 commit comments

Comments
 (0)