mirror of
https://git.proxmox.com/git/mirror_ubuntu-kernels.git
synced 2026-01-14 22:39:21 +00:00
Make pin_user_pages*() leave a ZERO_PAGE unpinned if it extracts a pointer to it from the page tables and make unpin_user_page*() correspondingly ignore a ZERO_PAGE when unpinning. We don't want to risk overrunning a zero page's refcount as we're only allowed ~2 million pins on it - something that userspace can conceivably trigger. Add a pair of functions to test whether a page or a folio is a ZERO_PAGE. Signed-off-by: David Howells <dhowells@redhat.com> cc: Christoph Hellwig <hch@infradead.org> cc: David Hildenbrand <david@redhat.com> cc: Lorenzo Stoakes <lstoakes@gmail.com> cc: Andrew Morton <akpm@linux-foundation.org> cc: Jens Axboe <axboe@kernel.dk> cc: Al Viro <viro@zeniv.linux.org.uk> cc: Matthew Wilcox <willy@infradead.org> cc: Jan Kara <jack@suse.cz> cc: Jeff Layton <jlayton@kernel.org> cc: Jason Gunthorpe <jgg@nvidia.com> cc: Logan Gunthorpe <logang@deltatee.com> cc: Hillf Danton <hdanton@sina.com> cc: Christian Brauner <brauner@kernel.org> cc: Linus Torvalds <torvalds@linux-foundation.org> cc: linux-fsdevel@vger.kernel.org cc: linux-block@vger.kernel.org cc: linux-kernel@vger.kernel.org cc: linux-mm@kvack.org Reviewed-by: Lorenzo Stoakes <lstoakes@gmail.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Acked-by: David Hildenbrand <david@redhat.com> Link: https://lore.kernel.org/r/20230526214142.958751-2-dhowells@redhat.com Signed-off-by: Jens Axboe <axboe@kernel.dk> |
||
|---|---|---|
| .. | ||
| irq | ||
| wrappers | ||
| asm-annotations.rst | ||
| assoc_array.rst | ||
| boot-time-mm.rst | ||
| cachetlb.rst | ||
| circular-buffers.rst | ||
| cpu_hotplug.rst | ||
| debug-objects.rst | ||
| debugging-via-ohci1394.rst | ||
| dma-api-howto.rst | ||
| dma-api.rst | ||
| dma-attributes.rst | ||
| dma-isa-lpc.rst | ||
| entry.rst | ||
| errseq.rst | ||
| genalloc.rst | ||
| generic-radix-tree.rst | ||
| genericirq.rst | ||
| gfp_mask-from-fs-io.rst | ||
| idr.rst | ||
| index.rst | ||
| kernel-api.rst | ||
| kobject.rst | ||
| kref.rst | ||
| librs.rst | ||
| local_ops.rst | ||
| maple_tree.rst | ||
| memory-allocation.rst | ||
| memory-hotplug.rst | ||
| mm-api.rst | ||
| netlink.rst | ||
| packing.rst | ||
| padata.rst | ||
| pin_user_pages.rst | ||
| printk-basics.rst | ||
| printk-formats.rst | ||
| printk-index.rst | ||
| protection-keys.rst | ||
| rbtree.rst | ||
| refcount-vs-atomic.rst | ||
| symbol-namespaces.rst | ||
| this_cpu_ops.rst | ||
| timekeeping.rst | ||
| tracepoint.rst | ||
| unaligned-memory-access.rst | ||
| watch_queue.rst | ||
| workqueue.rst | ||
| xarray.rst | ||