Files
Linux/fs
Mike Kravetz e32905e573 userfaultfd: hugetlbfs: fix new flag usage in error path
In commit d6995da311 ("hugetlb: use page.private for hugetlb specific
page flags") the use of PagePrivate to indicate a reservation count
should be restored at free time was changed to the hugetlb specific flag
HPageRestoreReserve.  Changes to a userfaultfd error path as well as a
VM_BUG_ON() in remove_inode_hugepages() were overlooked.

Users could see incorrect hugetlb reserve counts if they experience an
error with a UFFDIO_COPY operation.  Specifically, this would be the
result of an unlikely copy_huge_page_from_user error.  There is not an
increased chance of hitting the VM_BUG_ON.

Link: https://lkml.kernel.org/r/[email protected]
Fixes: d6995da311 ("hugetlb: use page.private for hugetlb specific page flags")
Signed-off-by: Mike Kravetz <[email protected]>
Reviewed-by: Mina Almasry <[email protected]>
Cc: Oscar Salvador <[email protected]>
Cc: Michal Hocko <[email protected]>
Cc: Muchun Song <[email protected]>
Cc: Naoya Horiguchi <[email protected]>
Cc: David Hildenbrand <[email protected]>
Cc: Matthew Wilcox <[email protected]>
Cc: Miaohe Lin <[email protected]>
Cc: Mina Almasry <[email protected]>
Cc: <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
2021-05-22 15:09:07 -10:00
..
…
…
2021-05-01 11:55:36 -07:00
2021-03-30 16:54:49 -07:00
…
2021-04-12 15:04:29 +02:00
…
2021-05-07 00:26:34 -07:00
…
2021-04-12 15:04:29 +02:00
2021-04-26 23:23:41 +01:00
…
…
…
…
2021-02-24 13:38:26 -08:00
…
2021-05-20 08:31:22 -07:00
…
…
2021-02-24 13:38:26 -08:00
…
…
…
…
2021-04-12 15:04:23 +02:00
2021-03-23 11:20:25 +01:00
…
…
…
…
2021-02-24 13:38:26 -08:00
…
…
…
…
2021-04-22 12:22:11 -07:00
…
…
…