diff options
author | Gustavo A. R. Silva <gustavo@embeddedor.com> | 2018-05-17 09:11:02 -0500 |
---|---|---|
committer | Daniel Borkmann <daniel@iogearbox.net> | 2018-05-17 22:44:49 +0200 |
commit | a78622932c27e8ec33e5ba180f3d2e87fb806b28 (patch) | |
tree | 16ba4fb1fc64e9336d57c11cde5cbc3b728b9966 | |
parent | 0e4364560361d57e8cd873a8990327f3471d7d8a (diff) | |
download | linux-stable-a78622932c27e8ec33e5ba180f3d2e87fb806b28.tar.gz linux-stable-a78622932c27e8ec33e5ba180f3d2e87fb806b28.tar.bz2 linux-stable-a78622932c27e8ec33e5ba180f3d2e87fb806b28.zip |
bpf: sockmap, fix double-free
`e' is being freed twice.
Fix this by removing one of the kfree() calls.
Addresses-Coverity-ID: 1468983 ("Double free")
Fixes: 81110384441a ("bpf: sockmap, add hash map support")
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
Acked-by: John Fastabend <john.fastabend@gmail.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
-rw-r--r-- | kernel/bpf/sockmap.c | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/kernel/bpf/sockmap.c b/kernel/bpf/sockmap.c index 41b41fcc0466..c682669570dc 100644 --- a/kernel/bpf/sockmap.c +++ b/kernel/bpf/sockmap.c @@ -1823,7 +1823,6 @@ static int __sock_map_ctx_update_elem(struct bpf_map *map, write_unlock_bh(&sock->sk_callback_lock); return err; out_free: - kfree(e); smap_release_sock(psock, sock); out_progs: if (verdict) |