Merge tag 'vfio-v6.3-rc1' of https://github.com/awilliam/linux-vfio
[platform/kernel/linux-rpi.git] / drivers / vfio / pci / vfio_pci_core.c
index c49f8f2..a5ab416 100644 (file)
@@ -144,7 +144,8 @@ static void vfio_pci_probe_mmaps(struct vfio_pci_core_device *vdev)
                         * of the exclusive page in case that hot-add
                         * device's bar is assigned into it.
                         */
-                       dummy_res = kzalloc(sizeof(*dummy_res), GFP_KERNEL);
+                       dummy_res =
+                               kzalloc(sizeof(*dummy_res), GFP_KERNEL_ACCOUNT);
                        if (dummy_res == NULL)
                                goto no_mmap;
 
@@ -863,7 +864,7 @@ int vfio_pci_core_register_dev_region(struct vfio_pci_core_device *vdev,
 
        region = krealloc(vdev->region,
                          (vdev->num_regions + 1) * sizeof(*region),
-                         GFP_KERNEL);
+                         GFP_KERNEL_ACCOUNT);
        if (!region)
                return -ENOMEM;
 
@@ -1644,7 +1645,7 @@ static int __vfio_pci_add_vma(struct vfio_pci_core_device *vdev,
 {
        struct vfio_pci_mmap_vma *mmap_vma;
 
-       mmap_vma = kmalloc(sizeof(*mmap_vma), GFP_KERNEL);
+       mmap_vma = kmalloc(sizeof(*mmap_vma), GFP_KERNEL_ACCOUNT);
        if (!mmap_vma)
                return -ENOMEM;