Merge branch 'msm-fixes-4.7-rc3' of git://people.freedesktop.org/~robclark/linux...
[linux-2.6-block.git] / kernel / bpf / stackmap.c
index f5a19548be12ee425ba3a90d1faff12b2dccdb8e..080a2dfb58004c06de7320c05e3404baab46562e 100644 (file)
@@ -116,7 +116,7 @@ free_smap:
        return ERR_PTR(err);
 }
 
-static u64 bpf_get_stackid(u64 r1, u64 r2, u64 flags, u64 r4, u64 r5)
+u64 bpf_get_stackid(u64 r1, u64 r2, u64 flags, u64 r4, u64 r5)
 {
        struct pt_regs *regs = (struct pt_regs *) (long) r1;
        struct bpf_map *map = (struct bpf_map *) (long) r2;
@@ -136,7 +136,8 @@ static u64 bpf_get_stackid(u64 r1, u64 r2, u64 flags, u64 r4, u64 r5)
                               BPF_F_FAST_STACK_CMP | BPF_F_REUSE_STACKID)))
                return -EINVAL;
 
-       trace = get_perf_callchain(regs, init_nr, kernel, user, false, false);
+       trace = get_perf_callchain(regs, init_nr, kernel, user,
+                                  sysctl_perf_event_max_stack, false, false);
 
        if (unlikely(!trace))
                /* couldn't fetch the stack trace */