Skip to content
Commit e9ea0b30 authored by Dan Carpenter's avatar Dan Carpenter Committed by Juergen Gross
Browse files

xen/grants: prevent integer overflow in gnttab_dma_alloc_pages()



The change from kcalloc() to kvmalloc() means that arg->nr_pages
might now be large enough that the "args->nr_pages << PAGE_SHIFT" can
result in an integer overflow.

Fixes: b3f7931f ("xen/gntdev: switch from kcalloc() to kvcalloc()")
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: default avatarJuergen Gross <jgross@suse.com>
Link: https://lore.kernel.org/r/YxDROJqu/RPvR0bi@kili


Signed-off-by: default avatarJuergen Gross <jgross@suse.com>
parent fe8f65b0
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment