]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commitdiff
mm/hmm: add missing pfns set to hmm_vma_walk_pmd()
authorJason Gunthorpe <jgg@mellanox.com>
Wed, 4 Mar 2020 20:25:56 +0000 (16:25 -0400)
committerJason Gunthorpe <jgg@mellanox.com>
Thu, 26 Mar 2020 17:33:37 +0000 (14:33 -0300)
All success exit paths from the walker functions must set the pfns array.

A migration entry with no required fault is a HMM_PFN_NONE return, just
like the pte case.

Fixes: d08faca018c4 ("mm/hmm: properly handle migration pmd")
Reviewed-by: Ralph Campbell <rcampbell@nvidia.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
mm/hmm.c

index 0e7a57246f03235da78565c10b86a4bddb4cfb77..09fc4569468e540d8459ccbdbe0f0e5b8bc32108 100644 (file)
--- a/mm/hmm.c
+++ b/mm/hmm.c
@@ -402,7 +402,7 @@ again:
                        pmd_migration_entry_wait(walk->mm, pmdp);
                        return -EBUSY;
                }
-               return 0;
+               return hmm_pfns_fill(start, end, range, HMM_PFN_NONE);
        } else if (!pmd_present(pmd))
                return hmm_pfns_fill(start, end, range, HMM_PFN_ERROR);