mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-04-13 09:59:31 +00:00
tools: fix atomic_set() definition to set the value correctly
Currently vma test is failing because of the new vma_assert_attached()
assertion. The check is failing because previous refcount_set() inside
vma_mark_attached() is a NoOp. Fix the definition of atomic_set() to
correctly set the value of the atomic.
Link: https://lkml.kernel.org/r/20241227222220.1726384-1-surenb@google.com
Fixes: 9325b8b5a1
("tools: add skeleton code for userland testing of VMA logic")
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
Reviewed-by: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
Cc: Jann Horn <jannh@google.com>
Cc: Liam R. Howlett <Liam.Howlett@Oracle.com>
Cc: Vlastimil Babka <vbabka@suse.cz>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
This commit is contained in:
parent
264a88cafd
commit
4bbb6df62c
2 changed files with 2 additions and 2 deletions
|
@ -2,6 +2,6 @@
|
|||
#define atomic_t int32_t
|
||||
#define atomic_inc(x) uatomic_inc(x)
|
||||
#define atomic_read(x) uatomic_read(x)
|
||||
#define atomic_set(x, y) do {} while (0)
|
||||
#define atomic_set(x, y) uatomic_set(x, y)
|
||||
#define U8_MAX UCHAR_MAX
|
||||
#include "../../../../include/linux/maple_tree.h"
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
#define atomic_t int32_t
|
||||
#define atomic_inc(x) uatomic_inc(x)
|
||||
#define atomic_read(x) uatomic_read(x)
|
||||
#define atomic_set(x, y) do {} while (0)
|
||||
#define atomic_set(x, y) uatomic_set(x, y)
|
||||
#define U8_MAX UCHAR_MAX
|
||||
|
||||
#endif /* _LINUX_ATOMIC_H */
|
||||
|
|
Loading…
Add table
Reference in a new issue