bpf, offload: Unlock on error in bpf_offload_dev_create()
authorDan Carpenter <dan.carpenter@oracle.com>
Mon, 4 Nov 2019 09:15:36 +0000 (12:15 +0300)
committerDaniel Borkmann <daniel@iogearbox.net>
Wed, 6 Nov 2019 23:20:27 +0000 (00:20 +0100)
commitd0fbb51dfaa612f960519b798387be436e8f83c5
tree70a0334af7e0f3f426222f0cb9aa935fdbc34cb6
parent2836654a2735d3bc0479edd3ca7457d909b007ed
bpf, offload: Unlock on error in bpf_offload_dev_create()

We need to drop the bpf_devs_lock on error before returning.

Fixes: 9fd7c5559165 ("bpf: offload: aggregate offloads per-device")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Link: https://lore.kernel.org/bpf/20191104091536.GB31509@mwanda
kernel/bpf/offload.c