mirror of
https://github.com/gnif/LookingGlass.git
synced 2024-11-25 14:57:20 +00:00
[kvmfr] fixed incorrect buffer size calculation
This commit is contained in:
parent
9d6d137b50
commit
687eddcc63
@ -199,7 +199,7 @@ static long kvmfr_dmabuf_create(struct kvmfr_dev * kdev, struct file * filp, uns
|
||||
return -ENOMEM;
|
||||
|
||||
kbuf->kdev = kdev;
|
||||
kbuf->pagecount = (create.size - create.offset) >> PAGE_SHIFT;
|
||||
kbuf->pagecount = create.size >> PAGE_SHIFT;
|
||||
kbuf->pages = kmalloc_array(kbuf->pagecount, sizeof(*kbuf->pages), GFP_KERNEL);
|
||||
if (!kbuf->pages)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user