All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] net: ip, diag -- Adjust raw_abort to use unlocked __udp_disconnect
@ 2016-11-01 20:05 Cyrill Gorcunov
  2016-11-01 20:52 ` Eric Dumazet
  2016-11-02 19:25 ` David Miller
  0 siblings, 2 replies; 4+ messages in thread
From: Cyrill Gorcunov @ 2016-11-01 20:05 UTC (permalink / raw)
  To: netdev, eric.dumazet
  Cc: David Miller, dsa, jhs, linux-kernel, kuznet, jmorris, yoshfuji,
	kaber, avagin, stephen

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 286c72deabaa240b7eebbd99496ed3324d69f3c0
 | Author: Eric Dumazet <edumazet@google.com>
 | 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.

CC: David S. Miller <davem@davemloft.net>
CC: Eric Dumazet <eric.dumazet@gmail.com>
CC: David Ahern <dsa@cumulusnetworks.com>
CC: Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>
CC: James Morris <jmorris@namei.org>
CC: Hideaki YOSHIFUJI <yoshfuji@linux-ipv6.org>
CC: Patrick McHardy <kaber@trash.net>
CC: Andrey Vagin <avagin@openvz.org>
CC: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
---

On top of net-next tree 22ca904ad70afc831d8503e80be1b6558a978759

 net/ipv4/raw.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Index: linux-ml.git/net/ipv4/raw.c
===================================================================
--- linux-ml.git.orig/net/ipv4/raw.c
+++ linux-ml.git/net/ipv4/raw.c
@@ -920,7 +920,7 @@ int raw_abort(struct sock *sk, int err)
 
 	sk->sk_err = err;
 	sk->sk_error_report(sk);
-	udp_disconnect(sk, 0);
+	__udp_disconnect(sk, 0);
 
 	release_sock(sk);
 

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] net: ip, diag -- Adjust raw_abort to use unlocked __udp_disconnect
  2016-11-01 20:05 [PATCH] net: ip, diag -- Adjust raw_abort to use unlocked __udp_disconnect Cyrill Gorcunov
@ 2016-11-01 20:52 ` Eric Dumazet
  2016-11-01 20:58   ` Cyrill Gorcunov
  2016-11-02 19:25 ` David Miller
  1 sibling, 1 reply; 4+ messages in thread
From: Eric Dumazet @ 2016-11-01 20:52 UTC (permalink / raw)
  To: Cyrill Gorcunov
  Cc: netdev, David Miller, dsa, jhs, linux-kernel, kuznet, jmorris,
	yoshfuji, kaber, avagin, stephen

On Tue, 2016-11-01 at 23:05 +0300, Cyrill Gorcunov wrote:
> 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 286c72deabaa240b7eebbd99496ed3324d69f3c0
>  | Author: Eric Dumazet <edumazet@google.com>
>  | 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.
> 

The preferred way to cite a bug origin is :

Fixes: 286c72deabaa ("udp: must lock the socket in udp_disconnect()")

> CC: David S. Miller <davem@davemloft.net>
> CC: Eric Dumazet <eric.dumazet@gmail.com>
> CC: David Ahern <dsa@cumulusnetworks.com>
> CC: Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>
> CC: James Morris <jmorris@namei.org>
> CC: Hideaki YOSHIFUJI <yoshfuji@linux-ipv6.org>
> CC: Patrick McHardy <kaber@trash.net>
> CC: Andrey Vagin <avagin@openvz.org>
> CC: Stephen Hemminger <stephen@networkplumber.org>

That is a lot of CC ...

> Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>

Acked-by: Eric Dumazet <edumazet@google.com>

Thanks.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] net: ip, diag -- Adjust raw_abort to use unlocked __udp_disconnect
  2016-11-01 20:52 ` Eric Dumazet
@ 2016-11-01 20:58   ` Cyrill Gorcunov
  0 siblings, 0 replies; 4+ messages in thread
From: Cyrill Gorcunov @ 2016-11-01 20:58 UTC (permalink / raw)
  To: Eric Dumazet
  Cc: netdev, David Miller, dsa, jhs, linux-kernel, kuznet, jmorris,
	yoshfuji, kaber, avagin, stephen

On Tue, Nov 01, 2016 at 01:52:34PM -0700, Eric Dumazet wrote:
> 
> The preferred way to cite a bug origin is :
> 
> Fixes: 286c72deabaa ("udp: must lock the socket in udp_disconnect()")

Aha. Thank you, will do this way next time.

> > CC: David S. Miller <davem@davemloft.net>
> > CC: Eric Dumazet <eric.dumazet@gmail.com>
> > CC: David Ahern <dsa@cumulusnetworks.com>
> > CC: Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>
> > CC: James Morris <jmorris@namei.org>
> > CC: Hideaki YOSHIFUJI <yoshfuji@linux-ipv6.org>
> > CC: Patrick McHardy <kaber@trash.net>
> > CC: Andrey Vagin <avagin@openvz.org>
> > CC: Stephen Hemminger <stephen@networkplumber.org>
> 
> That is a lot of CC ...

Because I CC'ed all for raw diag first patch, so I thought I've
to notify them with this typo in code.

> > Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
> 
> Acked-by: Eric Dumazet <edumazet@google.com>
> 
> Thanks.
> 
> 

	Cyrill

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] net: ip, diag -- Adjust raw_abort to use unlocked __udp_disconnect
  2016-11-01 20:05 [PATCH] net: ip, diag -- Adjust raw_abort to use unlocked __udp_disconnect Cyrill Gorcunov
  2016-11-01 20:52 ` Eric Dumazet
@ 2016-11-02 19:25 ` David Miller
  1 sibling, 0 replies; 4+ messages in thread
From: David Miller @ 2016-11-02 19:25 UTC (permalink / raw)
  To: gorcunov
  Cc: netdev, eric.dumazet, dsa, jhs, linux-kernel, kuznet, jmorris,
	yoshfuji, kaber, avagin, stephen

From: Cyrill Gorcunov <gorcunov@gmail.com>
Date: Tue, 1 Nov 2016 23:05:00 +0300

> 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 286c72deabaa240b7eebbd99496ed3324d69f3c0
>  | Author: Eric Dumazet <edumazet@google.com>
>  | 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.
> 
> CC: David S. Miller <davem@davemloft.net>
> CC: Eric Dumazet <eric.dumazet@gmail.com>
> CC: David Ahern <dsa@cumulusnetworks.com>
> CC: Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>
> CC: James Morris <jmorris@namei.org>
> CC: Hideaki YOSHIFUJI <yoshfuji@linux-ipv6.org>
> CC: Patrick McHardy <kaber@trash.net>
> CC: Andrey Vagin <avagin@openvz.org>
> CC: Stephen Hemminger <stephen@networkplumber.org>
> Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>

Applied with proper Fixes: tag added.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-11-02 19:25 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-11-01 20:05 [PATCH] net: ip, diag -- Adjust raw_abort to use unlocked __udp_disconnect Cyrill Gorcunov
2016-11-01 20:52 ` Eric Dumazet
2016-11-01 20:58   ` Cyrill Gorcunov
2016-11-02 19:25 ` David Miller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.