ANDROID: KVM: arm64: Fix missing_map type in hyp_alloc()
Should be size_t rather than int, to avoid overflow. Bug: 431949163 Bug: 357781595 Reported-by: Hiroyuki Katsura <hk590@cam.ac.uk> Change-Id: I33304da2559540d0e8915e4c12184a36fea8b18f Signed-off-by: Keir Fraser <keirf@google.com>
This commit is contained in:
@@ -549,7 +549,8 @@ void *hyp_alloc(size_t size)
|
||||
struct hyp_allocator *allocator = &hyp_allocator;
|
||||
struct chunk_hdr *chunk, *last_chunk;
|
||||
unsigned long chunk_addr;
|
||||
int missing_map, ret = 0;
|
||||
size_t missing_map;
|
||||
int ret = 0;
|
||||
|
||||
size = ALIGN(size ?: MIN_ALLOC, MIN_ALLOC);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user