Commit c4ef0b79 authored by Alex Williamson's avatar Alex Williamson Committed by Suren Baghdasaryan
Browse files

BACKPORT: mm: re-allow pinning of zero pfns

The commit referenced below subtly and inadvertently changed the logic to
disallow pinning of zero pfns.  This breaks device assignment with vfio
and potentially various other users of gup.  Exclude the zero page test
from the negation.

Link: https://lkml.kernel.org/r/165490039431.944052.12458624139225785964.stgit@omen


Fixes: 1c563432 ("mm: fix is_pinnable_page against a cma page")
Signed-off-by: default avatarAlex Williamson <alex.williamson@redhat.com>
Acked-by: default avatarMinchan Kim <minchan@kernel.org>
Acked-by: default avatarDavid Hildenbrand <david@redhat.com>
Reported-by: default avatarYishai Hadas <yishaih@nvidia.com>
Cc: Paul E. McKenney <paulmck@kernel.org>
Cc: John Hubbard <jhubbard@nvidia.com>
Cc: John Dias <joaodias@google.com>
Cc: Jason Gunthorpe <jgg@ziepe.ca>
Cc: Zhangfei Gao <zhangfei.gao@linaro.org>
Cc: Matthew Wilcox <willy@infradead.org>
Cc: Joao Martins <joao.m.martins@oracle.com>
Cc: Yi Liu <yi.l.liu@intel.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>

(cherry picked from commit 034e5afa)

Bug: 255454074
Change-Id: I3ade7555a64fdf553bc08eb344b18b2f3de7aa14
Signed-off-by: default avatarChinwen Chang <chinwen.chang@mediatek.com>
parent 45cda0a8
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment