Merge https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next
[linux-2.6-microblaze.git] / kernel / bpf / trampoline.c
index 5e7edf9..7224691 100644 (file)
@@ -213,7 +213,7 @@ static void __bpf_tramp_image_put_deferred(struct work_struct *work)
        im = container_of(work, struct bpf_tramp_image, work);
        bpf_image_ksym_del(&im->ksym);
        bpf_jit_free_exec(im->image);
-       bpf_jit_uncharge_modmem(1);
+       bpf_jit_uncharge_modmem(PAGE_SIZE);
        percpu_ref_exit(&im->pcref);
        kfree_rcu(im, rcu);
 }
@@ -310,7 +310,7 @@ static struct bpf_tramp_image *bpf_tramp_image_alloc(u64 key, u32 idx)
        if (!im)
                goto out;
 
-       err = bpf_jit_charge_modmem(1);
+       err = bpf_jit_charge_modmem(PAGE_SIZE);
        if (err)
                goto out_free_im;
 
@@ -332,7 +332,7 @@ static struct bpf_tramp_image *bpf_tramp_image_alloc(u64 key, u32 idx)
 out_free_image:
        bpf_jit_free_exec(im->image);
 out_uncharge:
-       bpf_jit_uncharge_modmem(1);
+       bpf_jit_uncharge_modmem(PAGE_SIZE);
 out_free_im:
        kfree(im);
 out: