Commit 9999370f authored by Cyrill Gorcunov's avatar Cyrill Gorcunov Committed by David S. Miller
Browse files

net: ip, raw_diag -- Use jump for exiting from nested loop

I managed to miss that sk_for_each is called under "for"
cycle so need to use goto here to return matching socket.

CC: David S. Miller <>
CC: Eric Dumazet <>
CC: David Ahern <>
CC: Andrey Vagin <>
CC: Stephen Hemminger <>
Signed-off-by: default avatarCyrill Gorcunov <>
Acked-by: default avatarDavid Ahern <>
Signed-off-by: default avatarDavid S. Miller <>
parent cd05a0ec
......@@ -79,10 +79,11 @@ static struct sock *raw_sock_get(struct net *net, const struct inet_diag_req_v2
* hashinfo->lock here.
goto out_unlock;
return sk ? sk : ERR_PTR(-ENOENT);
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment