From: Cyril Hrubis <chrubis@suse.cz>
To: Ricardo Branco <rbranco@suse.de>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] [PATCH v3] userfaultfd: Add test using UFFDIO_POISON
Date: Thu, 19 Feb 2026 16:52:41 +0100 [thread overview]
Message-ID: <aZcxySLjRJj4FbiC@yuki.lan> (raw)
In-Reply-To: <d26ee751-638d-4a01-97f7-61adcdabea60@suse.de>
Hi!
> >> WARNING: Use of volatile is usually wrong: see Documentation/process/volatile-considered-harmful.rst
> >> #88: FILE: userfaultfd06.c:88:
> >> + volatile char dummy;
> > I do not think that volatile is needed here.
>
> This is needed. Without it, the test hangs.
I suppose that the compiler optimizes out the read because we are not
using the value. We do have a maybe a bit more descriptive macro for
these cases called LTP_VAR_USED().
--
Cyril Hrubis
chrubis@suse.cz
--
Mailing list info: https://lists.linux.it/listinfo/ltp
prev parent reply other threads:[~2026-02-19 15:52 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-18 13:50 [LTP] [PATCH v3] userfaultfd: Add test using UFFDIO_POISON Ricardo Branco
2026-02-19 9:54 ` Andrea Cervesato via ltp
2026-02-19 11:21 ` Ricardo Branco
2026-02-19 11:34 ` Andrea Cervesato via ltp
2026-02-19 11:24 ` Cyril Hrubis
2026-02-19 11:28 ` Andrea Cervesato via ltp
2026-02-19 13:15 ` Cyril Hrubis
2026-02-19 11:37 ` Andrea Cervesato via ltp
2026-02-19 13:26 ` Ricardo Branco
2026-02-19 15:52 ` Cyril Hrubis [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=aZcxySLjRJj4FbiC@yuki.lan \
--to=chrubis@suse.cz \
--cc=ltp@lists.linux.it \
--cc=rbranco@suse.de \
/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