[LTP] [PATCH v3] userfaultfd: Add test using UFFDIO_POISON
Ricardo Branco
rbranco@suse.de
Thu Feb 19 12:21:18 CET 2026
On 2/19/26 10:54 AM, Andrea Cervesato wrote:
>> + SAFE_PTHREAD_JOIN(thr, NULL);
>> + reset_pages();
> This should also go into a cleanup(), otherwise if other syscalls will
> fail (ioctl for instance), memory will be lost.
Will fix this in userfaultfd06.c and then submit another to fix it in
the rest.
> Also, if I run checkpatch.pl on the code I get:
>
> WARNING: Use of volatile is usually wrong: see Documentation/process/volatile-considered-harmful.rst
> #25: FILE: userfaultfd06.c:25:
> +static volatile int poison_fault_seen;
>
> WARNING: Use of volatile is usually wrong: see Documentation/process/volatile-considered-harmful.rst
> #26: FILE: userfaultfd06.c:26:
> +static volatile int sigbus_seen;
>
> WARNING: Use of volatile is usually wrong: see Documentation/process/volatile-considered-harmful.rst
> #88: FILE: userfaultfd06.c:88:
> + volatile char dummy;
I've seen volatile being used in tests. There are legitimate uses for
this, in signal handlers.
> If you have `b4`, please run `b4 prep --check` before sending the patch.
I'm getting:
CRITICAL: This is not a prep-managed branch.
Best,
R.
More information about the ltp
mailing list