From: "tip-bot2 for Sasha Levin" <tip-bot2@linutronix.de>
To: linux-tip-commits@vger.kernel.org
Cc: Sasha Levin <sashal@kernel.org>,
Thomas Gleixner <tglx@kernel.org>,
andrealmeid@igalia.com, x86@kernel.org,
linux-kernel@vger.kernel.org
Subject: [tip: locking/futex] selftests/futex: Load atomic values before harness comparisons
Date: Mon, 30 Nov 2026 21:07:04 -0000 [thread overview]
Message-ID: <179607282463.1190409.3869419949548927.tip-bot2@tip-bot2> (raw)
In-Reply-To: <20261014200147.1364987-1-sashal@kernel.org>
The following commit has been merged into the locking/futex branch of tip:
Commit-ID: 30d00ffecaa9624bc7f4f84f3e8ff810be83a0a0
Gitweb: https://git.kernel.org/tip/30d00ffecaa9624bc7f4f84f3e8ff810be83a0a0
Author: Sasha Levin <sashal@kernel.org>
AuthorDate: Wed, 14 Oct 2026 16:01:47 -04:00
Committer: Thomas Gleixner <tglx@kernel.org>
CommitterDate: Mon, 30 Nov 2026 22:03:34 +01:00
selftests/futex: Load atomic values before harness comparisons
Clang 21 rejects the harness comparison because typeof(*futex) preserves
the atomic qualification. Load the value explicitly in the three affected
assertions so the harness compares unsigned integers. Atomic access and
its existing sequentially consistent ordering are preserved.
The baseline produces three invalid-operands errors. The complete futex
suite builds with Clang 21 and GCC 14 after the change.
Fixes: 608323bf7bb8 ("selftests: futex: Add tests for robust release operations")
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Thomas Gleixner <tglx@kernel.org>
Reviewed-by: André Almeida <andrealmeid@igalia.com>
Link: https://patch.msgid.link/20261014200147.1364987-1-sashal@kernel.org
---
tools/testing/selftests/futex/functional/robust_list.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/tools/testing/selftests/futex/functional/robust_list.c b/tools/testing/selftests/futex/functional/robust_list.c
index 87217c5..895e6cf 100644
--- a/tools/testing/selftests/futex/functional/robust_list.c
+++ b/tools/testing/selftests/futex/functional/robust_list.c
@@ -669,7 +669,7 @@ TEST_F(vdso_unlock, test_robust_try_unlock_uncontended)
ret = self->vdso(futex, tid, &head.list_op_pending);
ASSERT_EQ(ret, tid);
- ASSERT_EQ(*futex, 0);
+ ASSERT_EQ(atomic_load(futex), 0);
/* Check only the lower 32 bits for the 32-bit entry point */
if (variant->is_32) {
@@ -709,7 +709,7 @@ TEST_F(vdso_unlock, test_robust_try_unlock_contended)
ret = self->vdso(futex, tid, &head.list_op_pending);
ASSERT_EQ(ret, tid | FUTEX_WAITERS);
- ASSERT_EQ(*futex, tid | FUTEX_WAITERS);
+ ASSERT_EQ(atomic_load(futex), tid | FUTEX_WAITERS);
ASSERT_EQ(head.list_op_pending, &lock.list);
}
@@ -793,7 +793,7 @@ TEST_F(futex_op, test_futex_robust_unlock)
&head.list_op_pending, variant->val3);
ASSERT_EQ(ret, 0);
- ASSERT_EQ(*futex, 0);
+ ASSERT_EQ(atomic_load(futex), 0);
if (variant->op & FUTEX_ROBUST_LIST32) {
exp = (uint64_t)(unsigned long)&lock.list;
prev parent reply other threads:[~2026-11-30 21:07 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-14 20:01 [PATCH] selftests/futex: load " Sasha Levin
2026-11-03 13:01 ` Sasha Levin
2026-11-03 13:03 ` André Almeida
2026-11-30 21:07 ` tip-bot2 for Sasha Levin [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=179607282463.1190409.3869419949548927.tip-bot2@tip-bot2 \
--to=tip-bot2@linutronix.de \
--cc=andrealmeid@igalia.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=sashal@kernel.org \
--cc=tglx@kernel.org \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®