diff options
| author | Yury Norov <[email protected]> | 2022-05-09 18:20:47 -0700 |
|---|---|---|
| committer | akpm <[email protected]> | 2022-05-09 18:20:47 -0700 |
| commit | 0768c8de1b74b0f177d5f16c00b1459e92837d26 (patch) | |
| tree | 3adcdb3da7b925bf9302719273a5da230d80482a /tools/perf/scripts/python | |
| parent | bff9beaa2e8039d42dd60c27d0f0e2c586a6cb6b (diff) | |
mm/gup: fix comments to pin_user_pages_*()
pin_user_pages API forces FOLL_PIN in gup_flags, which means that the API
requires struct page **pages to be provided (not NULL). However, the
comment to pin_user_pages() clearly allows for passing in a NULL @pages
argument.
Remove the incorrect comments, and add WARN_ON_ONCE(!pages) calls to
enforce the API.
It has been independently spotted by Minchan Kim and confirmed with
John Hubbard:
https://lore.kernel.org/all/[email protected]/
Link: https://lkml.kernel.org/r/[email protected]
Signed-off-by: Yury Norov (NVIDIA) <[email protected]>
Reviewed-by: John Hubbard <[email protected]>
Cc: Minchan Kim <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions