xen/arm: don't ignore return errors from set_phys_to_machine
authorStefano Stabellini <stefano.stabellini@xilinx.com>
Mon, 15 Feb 2021 07:53:44 +0000 (08:53 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 23 Feb 2021 14:53:24 +0000 (15:53 +0100)
commit0462dbbe2cab43528f943575b510625cf422921a
treead40929e2ba03fa3cf4f0ef2a3dd66a10a2319a7
parentbe89a0300a58c273b6f48bb8db01c807e203098b
xen/arm: don't ignore return errors from set_phys_to_machine

commit 36bf1dfb8b266e089afa9b7b984217f17027bf35 upstream.

set_phys_to_machine can fail due to lack of memory, see the kzalloc call
in arch/arm/xen/p2m.c:__set_phys_to_machine_multi.

Don't ignore the potential return error in set_foreign_p2m_mapping,
returning it to the caller instead.

This is part of XSA-361.

Signed-off-by: Stefano Stabellini <stefano.stabellini@xilinx.com>
Cc: stable@vger.kernel.org
Reviewed-by: Julien Grall <jgrall@amazon.com>
Signed-off-by: Juergen Gross <jgross@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/arm/xen/p2m.c