Skip to contentSkip to conversation

net/rds: correct socket tunable error in rds_tcp_tune()

PATCH Applied William Kucharski 3 participants 3 messages Dec 1, 2021 – Dec 2, 2021

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 net/rds: correct socket tunable error in rds_tcp_tune()

Correct an error where setting /proc/sys/net/rds/tcp/rds_tcp_rcvbuf would instead modify the socket's sk_sndbuf and would leave sk_rcvbuf untouched.

Fixes c6a58ffed536 ("RDS: TCP: Add sysctl tunables for sndbuf/rcvbuf on rds-tcp socket")

---
V2: Add Fixes tag to refer to original commit that introduced the issue

 net/rds/tcp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
net/rds/tcp.c +1 -1
index abf19c0e3ba0..5327d130c4b5 100644
@@ -500,7 +500,7 @@ void rds_tcp_tune(struct socket *sock)
 		sk->sk_userlocks |= SOCK_SNDBUF_LOCK;
 	}
 	if (rtn->rcvbuf_size > 0) {
-		sk->sk_sndbuf = rtn->rcvbuf_size;
+		sk->sk_rcvbuf = rtn->rcvbuf_size;
 		sk->sk_userlocks |= SOCK_RCVBUF_LOCK;
 	}
 	release_sock(sk);
Signature · 1 line
2.33.1
Acked-by on v2 1/1
#1 lore raw
Quoted 10 lines · William Kucharski

Correct an error where setting /proc/sys/net/rds/tcp/rds_tcp_rcvbuf would instead modify the socket's sk_sndbuf and would leave sk_rcvbuf untouched.

Fixes c6a58ffed536 ("RDS: TCP: Add sysctl tunables for sndbuf/rcvbuf on rds-tcp socket")

---
V2: Add Fixes tag to refer to original commit that introduced the issue

Good catch.

#2 lore raw
In reply to William Kucharski
This patch was applied to netdev/net.git (master) by David S. Miller <[email protected]>:

Hello:

This patch was applied to netdev/net.git (master)
by David S. Miller <[email protected]>:

Quoted 9 lines · On Wed, 1 Dec 2021 07:45:22 -0700 you wrote:

Correct an error where setting /proc/sys/net/rds/tcp/rds_tcp_rcvbuf would instead modify the socket's sk_sndbuf and would leave sk_rcvbuf untouched.

Fixes c6a58ffed536 ("RDS: TCP: Add sysctl tunables for sndbuf/rcvbuf on rds-tcp socket")

---
V2: Add Fixes tag to refer to original commit that introduced the issue

[...]

Here is the summary with links:
- [V2] net/rds: correct socket tunable error in rds_tcp_tune()

    https://git.kernel.org/netdev/net/c/19f36edf14bc

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html