[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20181010.225703.1696580424843839117.davem@davemloft.net>
Date: Wed, 10 Oct 2018 22:57:03 -0700 (PDT)
From: David Miller <davem@...emloft.net>
To: jon.maloy@...csson.com
Cc: netdev@...r.kernel.org, gordan.mihaljevic@...tech.com.au,
tung.q.nguyen@...tech.com.au, hoang.h.le@...tech.com.au,
canh.d.luu@...tech.com.au, ying.xue@...driver.com,
tipc-discussion@...ts.sourceforge.net
Subject: Re: [net 1/1] tipc: queue socket protocol error messages into
socket receive buffer
From: Jon Maloy <jon.maloy@...csson.com>
Date: Wed, 10 Oct 2018 17:50:23 +0200
> From: Parthasarathy Bhuvaragan <parthasarathy.bhuvaragan@...csson.com>
>
> In tipc_sk_filter_rcv(), when we detect protocol messages with error we
> call tipc_sk_conn_proto_rcv() and let it reset the connection and notify
> the socket by calling sk->sk_state_change().
>
> However, tipc_sk_filter_rcv() may have been called from the function
> tipc_backlog_rcv(), in which case the socket lock is held and the socket
> already awake. This means that the sk_state_change() call is ignored and
> the error notification lost. Now the receive queue will remain empty and
> the socket sleeps forever.
>
> In this commit, we convert the protocol message into a connection abort
> message and enqueue it into the socket's receive queue. By this addition
> to the above state change we cover all conditions.
>
> Acked-by: Ying Xue <ying.xue@...driver.com>
> Signed-off-by: Parthasarathy Bhuvaragan <parthasarathy.bhuvaragan@...csson.com>
> Signed-off-by: Jon Maloy <jon.maloy@...csson.com>
Applied.
Powered by blists - more mailing lists