Commit 1340461e authored by Purva Yeshi's avatar Purva Yeshi Committed by Jakub Kicinski
Browse files

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: default avatarJoe Damato <jdamato@fastly.com>
Reviewed-by: default avatarSimon Horman <horms@kernel.org>
Signed-off-by: default avatarPurva Yeshi <purvayeshi550@gmail.com>
Reviewed-by: default avatarKuniyuki Iwashima <kuniyu@amazon.com>
Link: https://patch.msgid.link/20250218141045.38947-1-purvayeshi550@gmail.com


Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 7b5b7a59
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment