* [PATCH net-next 0/2] rxrpc: Fixes
@ 2020-10-15 12:59 David Howells
2020-10-15 12:59 ` [PATCH net-next 1/2] rxrpc: Fix bundle counting for exclusive connections David Howells
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: David Howells @ 2020-10-15 12:59 UTC (permalink / raw)
To: netdev; +Cc: dhowells, linux-afs, linux-kernel
Here are a couple of fixes that need to be applied on top of rxrpc patches
in net-next:
(1) Fix a bug in the connection bundle changes in the net-next tree.
(2) Fix the loss of final ACK on socket shutdown.
The patches are tagged here:
git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git
rxrpc-next-20201015
David
---
David Howells (2):
rxrpc: Fix bundle counting for exclusive connections
rxrpc: Fix loss of final ack on shutdown
net/rxrpc/ar-internal.h | 1 +
net/rxrpc/conn_client.c | 3 +++
net/rxrpc/conn_event.c | 6 +++---
3 files changed, 7 insertions(+), 3 deletions(-)
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH net-next 1/2] rxrpc: Fix bundle counting for exclusive connections
2020-10-15 12:59 [PATCH net-next 0/2] rxrpc: Fixes David Howells
@ 2020-10-15 12:59 ` David Howells
2020-10-15 12:59 ` [PATCH net-next 2/2] rxrpc: Fix loss of final ack on shutdown David Howells
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: David Howells @ 2020-10-15 12:59 UTC (permalink / raw)
To: netdev; +Cc: dhowells, linux-afs, linux-kernel
Fix rxrpc_unbundle_conn() to not drop the bundle usage count when cleaning
up an exclusive connection.
Based on the suggested fix from Hillf Danton.
Fixes: 245500d853e9 ("rxrpc: Rewrite the client connection manager")
Reported-by: syzbot+d57aaf84dd8a550e6d91@syzkaller.appspotmail.com
Signed-off-by: David Howells <dhowells@redhat.com>
cc: Hillf Danton <hdanton@sina.com>
---
net/rxrpc/conn_client.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/net/rxrpc/conn_client.c b/net/rxrpc/conn_client.c
index 78c845a4f1ad..5d9adfd4c84f 100644
--- a/net/rxrpc/conn_client.c
+++ b/net/rxrpc/conn_client.c
@@ -901,7 +901,7 @@ static void rxrpc_unbundle_conn(struct rxrpc_connection *conn)
struct rxrpc_bundle *bundle = conn->bundle;
struct rxrpc_local *local = bundle->params.local;
unsigned int bindex;
- bool need_drop = false;
+ bool need_drop = false, need_put = false;
int i;
_enter("C=%x", conn->debug_id);
@@ -928,10 +928,11 @@ static void rxrpc_unbundle_conn(struct rxrpc_connection *conn)
if (i == ARRAY_SIZE(bundle->conns) && !bundle->params.exclusive) {
_debug("erase bundle");
rb_erase(&bundle->local_node, &local->client_bundles);
+ need_put = true;
}
spin_unlock(&local->client_bundles_lock);
- if (i == ARRAY_SIZE(bundle->conns))
+ if (need_put)
rxrpc_put_bundle(bundle);
}
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH net-next 2/2] rxrpc: Fix loss of final ack on shutdown
2020-10-15 12:59 [PATCH net-next 0/2] rxrpc: Fixes David Howells
2020-10-15 12:59 ` [PATCH net-next 1/2] rxrpc: Fix bundle counting for exclusive connections David Howells
@ 2020-10-15 12:59 ` David Howells
2020-10-15 18:22 ` [PATCH net-next 0/2] rxrpc: Fixes Jakub Kicinski
2020-10-15 18:33 ` patchwork-bot+netdevbpf
3 siblings, 0 replies; 5+ messages in thread
From: David Howells @ 2020-10-15 12:59 UTC (permalink / raw)
To: netdev; +Cc: dhowells, linux-afs, linux-kernel
Fix the loss of transmission of a call's final ack when a socket gets shut
down. This means that the server will retransmit the last data packet or
send a ping ack and then get an ICMP indicating the port got closed. The
server will then view this as a failure.
Fixes: 3136ef49a14c ("rxrpc: Delay terminal ACK transmission on a client call")
Signed-off-by: David Howells <dhowells@redhat.com>
---
net/rxrpc/ar-internal.h | 1 +
net/rxrpc/conn_client.c | 3 +++
net/rxrpc/conn_event.c | 6 +++---
3 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/net/rxrpc/ar-internal.h b/net/rxrpc/ar-internal.h
index c9287b6551df..dce48162f6c2 100644
--- a/net/rxrpc/ar-internal.h
+++ b/net/rxrpc/ar-internal.h
@@ -831,6 +831,7 @@ void rxrpc_clean_up_local_conns(struct rxrpc_local *);
* conn_event.c
*/
void rxrpc_process_connection(struct work_struct *);
+void rxrpc_process_delayed_final_acks(struct rxrpc_connection *, bool);
/*
* conn_object.c
diff --git a/net/rxrpc/conn_client.c b/net/rxrpc/conn_client.c
index 5d9adfd4c84f..7e574c75be8e 100644
--- a/net/rxrpc/conn_client.c
+++ b/net/rxrpc/conn_client.c
@@ -906,6 +906,9 @@ static void rxrpc_unbundle_conn(struct rxrpc_connection *conn)
_enter("C=%x", conn->debug_id);
+ if (conn->flags & RXRPC_CONN_FINAL_ACK_MASK)
+ rxrpc_process_delayed_final_acks(conn, true);
+
spin_lock(&bundle->channel_lock);
bindex = conn->bundle_shift / RXRPC_MAXCALLS;
if (bundle->conns[bindex] == conn) {
diff --git a/net/rxrpc/conn_event.c b/net/rxrpc/conn_event.c
index 6b7c6f4a82e3..aff184145ffa 100644
--- a/net/rxrpc/conn_event.c
+++ b/net/rxrpc/conn_event.c
@@ -397,7 +397,7 @@ static void rxrpc_secure_connection(struct rxrpc_connection *conn)
/*
* Process delayed final ACKs that we haven't subsumed into a subsequent call.
*/
-static void rxrpc_process_delayed_final_acks(struct rxrpc_connection *conn)
+void rxrpc_process_delayed_final_acks(struct rxrpc_connection *conn, bool force)
{
unsigned long j = jiffies, next_j;
unsigned int channel;
@@ -416,7 +416,7 @@ static void rxrpc_process_delayed_final_acks(struct rxrpc_connection *conn)
smp_rmb(); /* vs rxrpc_disconnect_client_call */
ack_at = READ_ONCE(chan->final_ack_at);
- if (time_before(j, ack_at)) {
+ if (time_before(j, ack_at) && !force) {
if (time_before(ack_at, next_j)) {
next_j = ack_at;
set = true;
@@ -450,7 +450,7 @@ static void rxrpc_do_process_connection(struct rxrpc_connection *conn)
/* Process delayed ACKs whose time has come. */
if (conn->flags & RXRPC_CONN_FINAL_ACK_MASK)
- rxrpc_process_delayed_final_acks(conn);
+ rxrpc_process_delayed_final_acks(conn, false);
/* go through the conn-level event packets, releasing the ref on this
* connection that each one has when we've finished with it */
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH net-next 0/2] rxrpc: Fixes
2020-10-15 12:59 [PATCH net-next 0/2] rxrpc: Fixes David Howells
2020-10-15 12:59 ` [PATCH net-next 1/2] rxrpc: Fix bundle counting for exclusive connections David Howells
2020-10-15 12:59 ` [PATCH net-next 2/2] rxrpc: Fix loss of final ack on shutdown David Howells
@ 2020-10-15 18:22 ` Jakub Kicinski
2020-10-15 18:33 ` patchwork-bot+netdevbpf
3 siblings, 0 replies; 5+ messages in thread
From: Jakub Kicinski @ 2020-10-15 18:22 UTC (permalink / raw)
To: David Howells; +Cc: netdev, linux-afs, linux-kernel
On Thu, 15 Oct 2020 13:59:11 +0100 David Howells wrote:
> Here are a couple of fixes that need to be applied on top of rxrpc patches
> in net-next:
>
> (1) Fix a bug in the connection bundle changes in the net-next tree.
>
> (2) Fix the loss of final ACK on socket shutdown.
>
> The patches are tagged here:
>
> git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git
> rxrpc-next-20201015
Pulled, thanks!
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH net-next 0/2] rxrpc: Fixes
2020-10-15 12:59 [PATCH net-next 0/2] rxrpc: Fixes David Howells
` (2 preceding siblings ...)
2020-10-15 18:22 ` [PATCH net-next 0/2] rxrpc: Fixes Jakub Kicinski
@ 2020-10-15 18:33 ` patchwork-bot+netdevbpf
3 siblings, 0 replies; 5+ messages in thread
From: patchwork-bot+netdevbpf @ 2020-10-15 18:33 UTC (permalink / raw)
To: David Howells; +Cc: netdev, linux-afs, linux-kernel
Hello:
This series was applied to netdev/net-next.git (refs/heads/master):
On Thu, 15 Oct 2020 13:59:11 +0100 you wrote:
> Here are a couple of fixes that need to be applied on top of rxrpc patches
> in net-next:
>
> (1) Fix a bug in the connection bundle changes in the net-next tree.
>
> (2) Fix the loss of final ACK on socket shutdown.
>
> [...]
Here is the summary with links:
- [net-next,1/2] rxrpc: Fix bundle counting for exclusive connections
https://git.kernel.org/netdev/net-next/c/f3af4ad1e08a
- [net-next,2/2] rxrpc: Fix loss of final ack on shutdown
https://git.kernel.org/netdev/net-next/c/ddc7834af8d5
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2020-10-15 18:33 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-15 12:59 [PATCH net-next 0/2] rxrpc: Fixes David Howells
2020-10-15 12:59 ` [PATCH net-next 1/2] rxrpc: Fix bundle counting for exclusive connections David Howells
2020-10-15 12:59 ` [PATCH net-next 2/2] rxrpc: Fix loss of final ack on shutdown David Howells
2020-10-15 18:22 ` [PATCH net-next 0/2] rxrpc: Fixes Jakub Kicinski
2020-10-15 18:33 ` patchwork-bot+netdevbpf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).