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: <20190820115016.i6uuadjmqrr2iunt@48261080c7f1>
Date:   Tue, 20 Aug 2019 19:50:16 +0800
From:   kbuild test robot <lkp@...el.com>
To:     Björn Töpel <bjorn.topel@...el.com>
Cc:     kbuild-all@...org, Daniel Borkmann <daniel@...earbox.net>,
        Magnus Karlsson <magnus.karlsson@...el.com>,
        Jonathan Lemon <jonathan.lemon@...il.com>,
        Alexei Starovoitov <ast@...nel.org>,
        Martin KaFai Lau <kafai@...com>,
        Song Liu <songliubraving@...com>, Yonghong Song <yhs@...com>,
        netdev@...r.kernel.org, bpf@...r.kernel.org
Subject: [PATCH] xsk: fix ptr_ret.cocci warnings

From: kbuild test robot <lkp@...el.com>

kernel/bpf/xskmap.c:24:8-14: WARNING: PTR_ERR_OR_ZERO can be used


 Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR

Generated by: scripts/coccinelle/api/ptr_ret.cocci

Fixes: 0402acd683c6 ("xsk: remove AF_XDP socket from map when the socket is released")
CC: Björn Töpel <bjorn.topel@...el.com>
Signed-off-by: kbuild test robot <lkp@...el.com>
---

tree:   https://kernel.googlesource.com/pub/scm/linux/kernel/git/next/linux-next.git master
head:   54c851a8cc739ce7f1aaea583940054cdfe2223f
commit: 0402acd683c678874df6bdbc23530ca07ea19353 [7165/7710] xsk: remove AF_XDP socket from map when the socket is released

 xskmap.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/kernel/bpf/xskmap.c
+++ b/kernel/bpf/xskmap.c
@@ -21,7 +21,7 @@ int xsk_map_inc(struct xsk_map *map)
 	struct bpf_map *m = &map->map;
 
 	m = bpf_map_inc(m, false);
-	return IS_ERR(m) ? PTR_ERR(m) : 0;
+	return PTR_ERR_OR_ZERO(m);
 }
 
 void xsk_map_put(struct xsk_map *map)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ