diff mbox series

[net-next] Squash-to: "mptcp: use mptcp release_cb for delayed tasks"

Message ID d1c5f67cad16df705f4ac9ab6d830fa02350e0a0.1605863183.git.pabeni@redhat.com
State Accepted, archived
Commit 844e8defabb6cf1a1a7d8868ffbbb626cef52cc8
Delegated to: Matthieu Baerts
Headers show
Series [net-next] Squash-to: "mptcp: use mptcp release_cb for delayed tasks" | expand

Commit Message

Paolo Abeni Nov. 20, 2020, 9:07 a.m. UTC
fix uninitialized local variable usage.

Signed-off-by: Paolo Abeni <pabeni@redhat.com>
---
Side notes:
- not sure why gcc did not complain here
- if we will use the usual tags propagation schema will not credit
  the kernel test robot, on the flip side, I'm not sure if a:

Co-developed-by: kernel test robot <lkp@intel.com>

  tag is what we want ;)
---
 net/mptcp/protocol.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

Comments

Matthieu Baerts Nov. 20, 2020, 5:14 p.m. UTC | #1
Hi Paolo,

On 20/11/2020 10:07, Paolo Abeni wrote:
> fix uninitialized local variable usage.

Thank you for the fix!

- 844e8defabb6: "squashed" in "mptcp: use mptcp release_cb for delayed 
tasks"
- Results: b86f4581b5c3..e7025af96b11

Tests + export are in progress!

Cheers,
Matt
diff mbox series

Patch

diff --git a/net/mptcp/protocol.c b/net/mptcp/protocol.c
index c42f92764ec9..69441ea71411 100644
--- a/net/mptcp/protocol.c
+++ b/net/mptcp/protocol.c
@@ -1488,7 +1488,6 @@  static void __mptcp_subflow_push_pending(struct sock *sk, struct sock *ssk)
 	struct mptcp_sendmsg_info info;
 	struct mptcp_data_frag *dfrag;
 	int len, copied = 0;
-	u32 sndbuf;
 
 	info.flags = 0;
 	while ((dfrag = mptcp_send_head(sk))) {
@@ -1500,8 +1499,8 @@  static void __mptcp_subflow_push_pending(struct sock *sk, struct sock *ssk)
 
 			/* do auto tuning */
 			if (!(sk->sk_userlocks & SOCK_SNDBUF_LOCK) &&
-			    sndbuf > READ_ONCE(sk->sk_sndbuf))
-				WRITE_ONCE(sk->sk_sndbuf, sndbuf);
+			    ssk->sk_sndbuf > READ_ONCE(sk->sk_sndbuf))
+				WRITE_ONCE(sk->sk_sndbuf, ssk->sk_sndbuf);
 
 			if (unlikely(mptcp_must_reclaim_memory(sk, ssk))) {
 				__mptcp_update_wmem(sk);