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>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 1 Apr 2022 07:33:03 +0800
From:   kernel test robot <lkp@...el.com>
To:     Jens Axboe <axboe@...nel.dk>
Cc:     kbuild-all@...ts.01.org,
        GNU/Weeb Mailing List <gwml@...r.gnuweeb.org>,
        linux-kernel@...r.kernel.org
Subject: [PATCH] net: fix err_cast.cocci warnings

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

net/socket.c:1571:9-16: WARNING: ERR_CAST can be used with sock


 Use ERR_CAST inlined function instead of ERR_PTR(PTR_ERR(...))

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

Fixes: 3af464ccde38 ("net: add __sys_socket_file()")
Reported-by: kernel test robot <lkp@...el.com>
Signed-off-by: kernel test robot <lkp@...el.com>
---

tree:   https://github.com/ammarfaizi2/linux-block axboe/linux-block/sock-nolock
head:   8698873371093e22f708c2cf3a31f4dc2caab84f
commit: 3af464ccde389a5df95af3e221d098ac34d4606f [7/9] net: add __sys_socket_file()
:::::: branch date: 4 hours ago
:::::: commit date: 4 hours ago

 net/socket.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/net/socket.c
+++ b/net/socket.c
@@ -1568,7 +1568,7 @@ struct file *__sys_socket_direct(int fam
 
 	sock = __sys_socket_create(family, type, protocol);
 	if (IS_ERR(sock))
-		return ERR_PTR(PTR_ERR(sock));
+		return ERR_CAST(sock);
 
 	flags = type & ~SOCK_TYPE_MASK;
 	if (SOCK_NONBLOCK != O_NONBLOCK && (flags & SOCK_NONBLOCK))

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ