Hi,
From my side, I managed to avoid the freezing of processes with the
following change in function userfaultfd_release() in file
fs/userfaultfd.c
(https://elixir.bootlin.com/linux/v5.13/source/fs/userfaultfd.c#L842):
I moved the following command from line 851:
WRITE_ONCE(ctx->released, true);
(https://elixir.bootlin.com/linux/v5.13/source/fs/userfaultfd.c#L851)
to line 905, that is exactly before the functions returns 0.
That simple workaround worked for my use case but I am far from sure
that is a correct/sufficient fix for the problem at hand.
Best Regards,
Dimitris
Στις 07/03/2025 10:07, Jinjiang Tu έγραψε:
cc Peter Xu
在 2025/3/7 15:21, Jinjiang Tu 写道:
Hi,
I encountered the same issue too. In my scenario, GUP is called by
mlockall()
syscall.
Is there a solution to fix it?
Thanks.