Files
xen/tools
Juergen Gross 52daa6a848 xen/gnttab: fix gnttab_acquire_resource()
Commit 9dc46386d8 ("gnttab: work around "may be used uninitialized"
warning") was wrong, as vaddrs can legitimately be NULL in case
XENMEM_resource_grant_table_id_status was specified for a grant table
v1. This would result in crashes in debug builds due to
ASSERT_UNREACHABLE() triggering.

Check vaddrs only to be NULL in the rc == 0 case.

Expand the tests in tools/tests/resource to tickle this path, and verify that
using XENMEM_resource_grant_table_id_status on a v1 grant table fails.

Fixes: 9dc46386d8 ("gnttab: work around "may be used uninitialized" warning")
Signed-off-by: Juergen Gross <jgross@suse.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com> # xen
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
Release-acked-by: Henry Wang <Henry.Wang@arm.com>
2022-09-09 16:28:38 +01:00
..
2022-07-11 12:13:24 +02:00
2022-08-22 12:09:10 +02:00
2022-08-15 08:55:19 +02:00
2022-08-11 11:45:23 +02:00
2021-12-16 20:27:13 +00:00
2021-02-01 15:18:36 +00:00
2022-08-15 08:55:25 +02:00
2022-08-15 08:55:25 +02:00