]> git.baikalelectronics.ru Git - kernel.git/commit
mm: re-allow pinning of zero pfns
authorAlex Williamson <alex.williamson@redhat.com>
Fri, 10 Jun 2022 22:35:13 +0000 (16:35 -0600)
committerakpm <akpm@linux-foundation.org>
Fri, 17 Jun 2022 02:11:32 +0000 (19:11 -0700)
commit25c3721375d1bd9c45717261c46d60e303cb6e77
tree345fc7dbe9433e193e528d1efae2441dcbffec78
parenta9faa9fd0e79681896733e24aabee93577c523be
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: bebb467bb213 ("mm: fix is_pinnable_page against a cma page")
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Acked-by: Minchan Kim <minchan@kernel.org>
Acked-by: David Hildenbrand <david@redhat.com>
Reported-by: Yishai 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: Andrew Morton <akpm@linux-foundation.org>
include/linux/mm.h