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-next>] [day] [month] [year] [list]
Message-Id: <20250210075006.9126-1-purvayeshi550@gmail.com>
Date: Mon, 10 Feb 2025 13:20:06 +0530
From: Purva Yeshi <purvayeshi550@...il.com>
To: "David S . Miller" <davem@...emloft.net>,
	Eric Dumazet <edumazet@...gle.com>,
	Jakub Kicinski <kuba@...nel.org>,
	Paolo Abeni <pabeni@...hat.com>
Cc: skhan@...uxfoundation.org,
	Simon Horman <horms@...nel.org>,
	Purva Yeshi <purvayeshi550@...il.com>,
	netdev@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: [PATCH net-next v2] af_unix: Fix undefined 'other' error

Fix issue detected by smatch tool:
An "undefined 'other'" error occur in __releases() annotation.

Fix an undefined 'other' error in unix_wait_for_peer() caused by  
__releases(&unix_sk(other)->lock) being placed before 'other' is in  
scope. Since AF_UNIX does not use Sparse annotations, remove it to fix  
the issue.  

Eliminate the error without affecting functionality.  

Signed-off-by: Purva Yeshi <purvayeshi550@...il.com>
---
V1 - https://lore.kernel.org/lkml/20250209184355.16257-1-purvayeshi550@gmail.com/
V2 - Remove __releases() annotation as AF_UNIX does not use Sparse annotations.
 net/unix/af_unix.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/net/unix/af_unix.c b/net/unix/af_unix.c
index 34945de1f..319153850 100644
--- a/net/unix/af_unix.c
+++ b/net/unix/af_unix.c
@@ -1508,7 +1508,6 @@ static int unix_dgram_connect(struct socket *sock, struct sockaddr *addr,
 }
 
 static long unix_wait_for_peer(struct sock *other, long timeo)
-	__releases(&unix_sk(other)->lock)
 {
 	struct unix_sock *u = unix_sk(other);
 	int sched;
-- 
2.34.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ