lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20180518075850.GA28335@mwanda>
Date:   Fri, 18 May 2018 10:58:50 +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 2/2] bpf: sockmap, potential uninitialized return in
 __sock_map_ctx_update_elem()

Smatch complains that "err" might be uninitialized.  That seems
possible.  Anyway we can just return zero.

Fixes: e5cd3abcb31a ("bpf: sockmap, refactor sockmap routines to work with hashmap")
Signed-off-by: Dan Carpenter <dan.carpenter@...cle.com>

diff --git a/kernel/bpf/sockmap.c b/kernel/bpf/sockmap.c
index c6de1393df63..6298adb3162a 100644
--- a/kernel/bpf/sockmap.c
+++ b/kernel/bpf/sockmap.c
@@ -1821,7 +1821,7 @@ static int __sock_map_ctx_update_elem(struct bpf_map *map,
 		list_add_tail(&e->list, &psock->maps);
 	}
 	write_unlock_bh(&sock->sk_callback_lock);
-	return err;
+	return 0;
 out_free:
 	kfree(e);
 	smap_release_sock(psock, sock);

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ