summaryrefslogtreecommitdiff
path: root/fs/userfaultfd.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/userfaultfd.c')
-rw-r--r--fs/userfaultfd.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/userfaultfd.c b/fs/userfaultfd.c
index c5ba1f4487bd..e90c4a762917 100644
--- a/fs/userfaultfd.c
+++ b/fs/userfaultfd.c
@@ -653,7 +653,7 @@ int dup_userfaultfd(struct vm_area_struct *vma, struct list_head *fcs)
}
if (!ctx) {
- fctx = kmalloc(sizeof(*fctx), GFP_KERNEL);
+ fctx = kmalloc_obj(*fctx, GFP_KERNEL);
if (!fctx)
return -ENOMEM;
@@ -840,7 +840,7 @@ int userfaultfd_unmap_prep(struct vm_area_struct *vma, unsigned long start,
has_unmap_ctx(ctx, unmaps, start, end))
return 0;
- unmap_ctx = kzalloc(sizeof(*unmap_ctx), GFP_KERNEL);
+ unmap_ctx = kzalloc_obj(*unmap_ctx, GFP_KERNEL);
if (!unmap_ctx)
return -ENOMEM;