diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2022-01-31 10:13:10 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2022-01-31 10:13:10 +0100 |
commit | 60c250a98d4ca12a34a89a498cb05d4d221f2f19 (patch) | |
tree | f73a2201c64cb9c86fd4d78eac442548bc6df590 /kernel/bpf/stackmap.c | |
parent | 993a44fa85c1ea5989fb5c46236ca2e3cfd71b78 (diff) | |
parent | 26291c54e111ff6ba87a164d85d4a4e134b7315c (diff) |
Merge tag 'v5.17-rc2' into usb-next
We need the USB fixes in here as well.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'kernel/bpf/stackmap.c')
-rw-r--r-- | kernel/bpf/stackmap.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/kernel/bpf/stackmap.c b/kernel/bpf/stackmap.c index 49e567209c6b6..22c8ae94e4c1c 100644 --- a/kernel/bpf/stackmap.c +++ b/kernel/bpf/stackmap.c @@ -472,13 +472,14 @@ BPF_CALL_4(bpf_get_task_stack, struct task_struct *, task, void *, buf, u32, size, u64, flags) { struct pt_regs *regs; - long res; + long res = -EINVAL; if (!try_get_task_stack(task)) return -EFAULT; regs = task_pt_regs(task); - res = __bpf_get_stack(regs, task, NULL, buf, size, flags); + if (regs) + res = __bpf_get_stack(regs, task, NULL, buf, size, flags); put_task_stack(task); return res; |