linux-stable/net/9p
Juergen Gross a019d26830 xen/9p: use alloc/free_pages_exact()
Commit 5cadd4bb1d upstream.

Instead of __get_free_pages() and free_pages() use alloc_pages_exact()
and free_pages_exact(). This is in preparation of a change of
gnttab_end_foreign_access() which will prohibit use of high-order
pages.

By using the local variable "order" instead of ring->intf->ring_order
in the error path of xen_9pfs_front_alloc_dataring() another bug is
fixed, as the error path can be entered before ring->intf->ring_order
is being set.

By using alloc_pages_exact() the size in bytes is specified for the
allocation, which fixes another bug for the case of
order < (PAGE_SHIFT - XEN_PAGE_SHIFT).

This is part of CVE-2022-23041 / XSA-396.

Reported-by: Simon Gaiser <simon@invisiblethingslab.com>
Signed-off-by: Juergen Gross <jgross@suse.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-03-11 12:22:36 +01:00
..
client.c 9p/net: fix missing error check in p9_check_errors 2021-11-18 19:17:16 +01:00
error.c net: 9p: Correct function name errstr2errno() in the kerneldoc comments 2021-03-28 17:56:56 -07:00
Kconfig net: remove redundant 'depends on NET' 2021-01-27 17:04:12 -08:00
Makefile
mod.c net: Add MODULE_DESCRIPTION entries to network modules 2020-06-20 21:33:57 -07:00
protocol.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 188 2019-05-30 11:29:21 -07:00
protocol.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 188 2019-05-30 11:29:21 -07:00
trans_common.c net: 9p: Fix kerneldoc warnings of missing parameters etc 2020-11-02 12:25:52 -08:00
trans_common.h
trans_fd.c net/9p: increase tcp max msize to 1MB 2021-09-05 08:35:56 +09:00
trans_rdma.c net: 9p: Fix kerneldoc warnings of missing parameters etc 2020-11-02 12:25:52 -08:00
trans_virtio.c 9p/trans_virtio: Remove sysfs file on probe failure 2021-07-27 23:01:15 +09:00
trans_xen.c xen/9p: use alloc/free_pages_exact() 2022-03-11 12:22:36 +01:00