diff options
author | Naveen N. Rao <[email protected]> | 2022-01-06 17:15:05 +0530 |
---|---|---|
committer | Michael Ellerman <[email protected]> | 2022-01-15 12:21:23 +1100 |
commit | b992f01e66150fc5e90be4a96f5eb8e634c8249e (patch) | |
tree | 9f53305f2fd72cefa6438695e935e036a4e3b4b6 /drivers/usb/cdns3/cdns3-trace.h | |
parent | 29ec39fcf11e4583eb8d5174f756ea109c77cc44 (diff) |
bpf: Guard against accessing NULL pt_regs in bpf_get_task_stack()
task_pt_regs() can return NULL on powerpc for kernel threads. This is
then used in __bpf_get_stack() to check for user mode, resulting in a
kernel oops. Guard against this by checking return value of
task_pt_regs() before trying to obtain the call chain.
Fixes: fa28dcb82a38f8 ("bpf: Introduce helper bpf_get_task_stack()")
Cc: [email protected] # v5.9+
Signed-off-by: Naveen N. Rao <[email protected]>
Acked-by: Daniel Borkmann <[email protected]>
Signed-off-by: Michael Ellerman <[email protected]>
Link: https://lore.kernel.org/r/d5ef83c361cc255494afd15ff1b4fb02a36e1dcf.1641468127.git.naveen.n.rao@linux.vnet.ibm.com
Diffstat (limited to 'drivers/usb/cdns3/cdns3-trace.h')
0 files changed, 0 insertions, 0 deletions