[kvmfr] fixed incorrect buffer size calculation

This commit is contained in:
Geoffrey McRae 2020-01-24 17:07:09 +11:00
parent 9d6d137b50
commit 687eddcc63
2 changed files with 3 additions and 3 deletions

View File

@ -1 +1 @@
B1-105-ga75b95694b+1
B1-106-g9d6d137b50+1

View File

@ -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)
{