[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180518075810.GA28285@mwanda>
Date: Fri, 18 May 2018 10:58:10 +0300
From: Dan Carpenter <dan.carpenter@...cle.com>
To: Alexei Starovoitov <ast@...nel.org>,
John Fastabend <john.fastabend@...il.com>
Cc: Daniel Borkmann <daniel@...earbox.net>, netdev@...r.kernel.org,
kernel-janitors@...r.kernel.org
Subject: [PATCH 1/2] bpf: sockmap, double free in __sock_map_ctx_update_elem()
We accidentally free "e" twice.
Fixes: 81110384441a ("bpf: sockmap, add hash map support")
Signed-off-by: Dan Carpenter <dan.carpenter@...cle.com>
diff --git a/kernel/bpf/sockmap.c b/kernel/bpf/sockmap.c
index c6de1393df63..216d5c9b0eb3 100644
--- a/kernel/bpf/sockmap.c
+++ b/kernel/bpf/sockmap.c
@@ -1833,7 +1833,6 @@ static int __sock_map_ctx_update_elem(struct bpf_map *map,
if (tx_msg)
bpf_prog_put(tx_msg);
write_unlock_bh(&sock->sk_callback_lock);
- kfree(e);
return err;
}
Powered by blists - more mailing lists