linux-stable/drivers/dma-buf
Mike Kravetz 43576a9994 udmabuf: revert 'Add support for mapping hugepages (v4)'
commit b7cb382190 upstream.

This effectively reverts commit 16c243e99d ("udmabuf: Add support for
mapping hugepages (v4)").  Recently, Junxiao Chang found a BUG with page
map counting as described here [1].  This issue pointed out that the
udmabuf driver was making direct use of subpages of hugetlb pages.  This
is not a good idea, and no other mm code attempts such use.  In addition
to the mapcount issue, this also causes issues with hugetlb vmemmap
optimization and page poisoning.

For now, remove hugetlb support.

If udmabuf wants to be used on hugetlb mappings, it should be changed to
only use complete hugetlb pages.  This will require different alignment
and size requirements on the UDMABUF_CREATE API.

[1] https://lore.kernel.org/linux-mm/20230512072036.1027784-1-junxiao.chang@intel.com/

Link: https://lkml.kernel.org/r/20230608204927.88711-1-mike.kravetz@oracle.com
Fixes: 16c243e99d ("udmabuf: Add support for mapping hugepages (v4)")
Signed-off-by: Mike Kravetz <mike.kravetz@oracle.com>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Acked-by: Vivek Kasireddy <vivek.kasireddy@intel.com>
Acked-by: Gerd Hoffmann <kraxel@redhat.com>
Cc: David Hildenbrand <david@redhat.com>
Cc: Dongwon Kim <dongwon.kim@intel.com>
Cc: James Houghton <jthoughton@google.com>
Cc: Jerome Marchand <jmarchan@redhat.com>
Cc: Junxiao Chang <junxiao.chang@intel.com>
Cc: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Cc: Michal Hocko <mhocko@suse.com>
Cc: Muchun Song <muchun.song@linux.dev>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-06-28 11:13:58 +02:00
..
heaps dma-buf/heaps: Assert held reservation lock for dma-buf mmapping 2022-11-11 23:49:51 +03:00
Kconfig dma-buf: deprecate DMABUF_SYSFS_STATS 2022-06-23 10:51:43 +02:00
Makefile dma-buf: cleanup dma_fence_unwrap implementation 2022-05-30 14:16:32 +02:00
dma-buf-sysfs-stats.c dma-buf: make kobj_type structure constant 2023-02-17 09:16:34 +01:00
dma-buf-sysfs-stats.h dma-buf: fix dma_buf_export init order v2 2022-12-13 08:31:45 +01:00
dma-buf.c Linux 6.2-rc6 2023-01-31 12:23:23 +01:00
dma-fence-array.c dma-buf: handle empty dma_fence_arrays gracefully 2022-03-29 09:14:30 +02:00
dma-fence-chain.c dma-buf: cleanup dma_fence_chain_walk 2022-05-30 11:24:50 +02:00
dma-fence-unwrap.c dma-buf: revert "return only unsignaled fences in dma_fence_unwrap_for_each v3" 2022-07-14 14:41:30 +02:00
dma-fence.c dma-buf: actually set signaling bit for private stub fences 2023-02-01 11:17:34 +01:00
dma-heap.c Driver Core changes for 6.2-rc1 2022-12-16 03:54:54 -08:00
dma-resv.c dma-buf: Proactively round up to kmalloc bucket size 2022-11-01 10:04:52 -07:00
selftest.c
selftest.h
selftests.h dma-buf: add dma_fence_unwrap v2 2022-03-25 14:18:28 +01:00
st-dma-fence-chain.c treewide: use get_random_u32_inclusive() when possible 2022-11-18 02:18:02 +01:00
st-dma-fence-unwrap.c dma-buf: Enable signaling on fence for selftests 2022-09-16 15:53:25 +02:00
st-dma-fence.c dma-buf: Enable signaling on fence for selftests 2022-09-16 15:53:25 +02:00
st-dma-resv.c dma-buf: Enable signaling on fence for selftests 2022-09-16 15:53:25 +02:00
sw_sync.c
sync_debug.c
sync_debug.h
sync_file.c dma-buf/sync_file: use strscpy to replace strlcpy 2022-08-10 13:50:49 +02:00
sync_trace.h
udmabuf.c udmabuf: revert 'Add support for mapping hugepages (v4)' 2023-06-28 11:13:58 +02:00