Commit 3de864f8 authored by Cyrill Gorcunov's avatar Cyrill Gorcunov Committed by David S. Miller
Browse files

net: ip, diag -- Adjust raw_abort to use unlocked __udp_disconnect

While being preparing patches for killing raw sockets via
diag netlink interface I noticed that my runs are stuck:

 | [root@pcs7 ~]# cat /proc/`pidof ss`/stack
 | [<ffffffff816d1a76>] __lock_sock+0x80/0xc4
 | [<ffffffff816d206a>] lock_sock_nested+0x47/0x95
 | [<ffffffff8179ded6>] udp_disconnect+0x19/0x33
 | [<ffffffff8179b517>] raw_abort+0x33/0x42
 | [<ffffffff81702322>] sock_diag_destroy+0x4d/0x52

which has not been the case before. I narrowed it down to the commit

 | commit 286c72de
 | Author: Eric Dumazet <>
 | Date:   Thu Oct 20 09:39:40 2016 -0700
 |     udp: must lock the socket in udp_disconnect()

where we start locking the socket for different reason.

So the raw_abort escaped the renaming and we have to
fix this typo using __udp_disconnect instead.

Fixes: 286c72de

 ("udp: must lock the socket in udp_disconnect()")
CC: David S. Miller <>
CC: Eric Dumazet <>
CC: David Ahern <>
CC: Alexey Kuznetsov <>
CC: James Morris <>
CC: Hideaki YOSHIFUJI <>
CC: Patrick McHardy <>
CC: Andrey Vagin <>
CC: Stephen Hemminger <>
Signed-off-by: default avatarCyrill Gorcunov <>
Acked-by: default avatarEric Dumazet <>
Signed-off-by: default avatarDavid S. Miller <>
parent cc89c323
......@@ -920,7 +920,7 @@ int raw_abort(struct sock *sk, int err)
sk->sk_err = err;
udp_disconnect(sk, 0);
__udp_disconnect(sk, 0);
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