mirror of
https://github.com/gnif/LookingGlass.git
synced 2024-12-22 13:33:40 +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)
|
||||
{
|
||||
@ -436,4 +436,4 @@ module_exit(kvmfr_module_exit);
|
||||
|
||||
MODULE_DEVICE_TABLE(pci, kvmfr_pci_ids);
|
||||
MODULE_LICENSE("GPL v2");
|
||||
MODULE_AUTHOR("Geoffrey McRae");
|
||||
MODULE_AUTHOR("Geoffrey McRae");
|
||||
|
Loading…
Reference in New Issue
Block a user