Re: [PATCH net] net/sched: fix NULL dereference in the error path of tcf_bpf_init()

2018-04-06 Thread Lucas Bates
On Thu, Apr 5, 2018 at 7:19 PM, Davide Caratti wrote: > when tcf_bpf_init_from_ops() fails (e.g. because of program having invalid > number of instructions), tcf_bpf_cfg_cleanup() calls bpf_prog_put(NULL) or > bpf_prog_destroy(NULL). Unless CONFIG_BPF_SYSCALL is unset, this

[PATCH net] net/sched: fix NULL dereference in the error path of tcf_bpf_init()

2018-04-05 Thread Davide Caratti
when tcf_bpf_init_from_ops() fails (e.g. because of program having invalid number of instructions), tcf_bpf_cfg_cleanup() calls bpf_prog_put(NULL) or bpf_prog_destroy(NULL). Unless CONFIG_BPF_SYSCALL is unset, this causes the following error: BUG: unable to handle kernel NULL pointer dereference