Files
linux/mm
Axel Rasmussen 02732576b1 FROMLIST: userfaultfd/shmem: fix minor fault page leak
This fix is analogous to Peter Xu's fix for hugetlb [0]. If we don't
put_page() after getting the page out of the page cache, we leak the
reference.

The fix can be verified by checking /proc/meminfo and running the
userfaultfd selftest in shmem mode. Without the fix, we see MemFree /
MemAvailable steadily decreasing with each run of the test. With the
fix, memory is correctly freed after the test program exits.

Fixes: 00da60b9d0a0 ("userfaultfd: support minor fault handling for shmem")
Signed-off-by: Axel Rasmussen <axelrasmussen@google.com>
Reviewed-by: Peter Xu <peterx@redhat.com>

Signed-off-by: Lokesh Gidra <lokeshgidra@google.com>
Link: https://lore.kernel.org/patchwork/patch/1400686/
Bug: 160737021
Bug: 169683130
Change-Id: I599f1434e24fce6e31d0d73c7f9c4714e9875b63
2021-04-09 15:36:02 -07:00
..
2021-03-25 19:20:09 +00:00
2021-03-25 19:20:09 +00:00
2021-03-07 12:33:33 +01:00
2021-03-25 19:20:09 +00:00
2021-02-10 09:53:50 +01:00
2021-02-25 19:36:38 +00:00
2021-04-02 15:25:50 +02:00
2021-01-06 16:16:41 +00:00
2020-06-08 11:05:55 -07:00
2021-01-11 20:27:24 +00:00
2021-04-01 00:09:35 +00:00
2021-04-01 00:09:35 +00:00
2021-03-07 12:53:30 +01:00
2021-01-19 18:49:54 +01:00
2021-03-07 12:33:33 +01:00
2021-03-07 12:53:30 +01:00