diff --git a/fs/userfaultfd.c b/fs/userfaultfd.c index 743eaa6468987eaea8d087cc286b04444bd8fcd7..a9d0ddc12aced408107cd0fe384f5cc51cfffd75 100644 --- a/fs/userfaultfd.c +++ b/fs/userfaultfd.c @@ -294,10 +294,13 @@ static inline bool userfaultfd_must_wait(struct userfaultfd_ctx *ctx, * pmd_trans_unstable) of the pmd. */ _pmd = READ_ONCE(*pmd); - if (!pmd_present(_pmd)) + if (pmd_none(_pmd)) goto out; ret = false; + if (!pmd_present(_pmd)) + goto out; + if (pmd_trans_huge(_pmd)) goto out;