From: Purva Yeshi Date: Tue, 18 Feb 2025 14:10:45 +0000 (+0530) Subject: af_unix: Fix undefined 'other' error X-Git-Tag: v6.15-rc1~160^2~262 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1340461e5168f8a33b2b3e0ed04557742664bee1;p=thirdparty%2Flinux.git af_unix: Fix undefined 'other' error Fix an issue with the sparse static analysis tool where an "undefined 'other'" error occurs due to `__releases(&unix_sk(other)->lock)` being placed before 'other' is in scope. Remove the `__releases()` annotation from the `unix_wait_for_peer()` function to eliminate the sparse error. The annotation references `other` before it is declared, leading to a false positive error during static analysis. Since AF_UNIX does not use sparse annotations, this annotation is unnecessary and does not impact functionality. Reviewed-by: Joe Damato Reviewed-by: Simon Horman Signed-off-by: Purva Yeshi Reviewed-by: Kuniyuki Iwashima Link: https://patch.msgid.link/20250218141045.38947-1-purvayeshi550@gmail.com Signed-off-by: Jakub Kicinski --- diff --git a/net/unix/af_unix.c b/net/unix/af_unix.c index 34945de1fb1fa..319153850be18 100644 --- a/net/unix/af_unix.c +++ b/net/unix/af_unix.c @@ -1508,7 +1508,6 @@ out: } 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;