mptcp: never fetch fwd memory from the subflow
The memory accounting is broken in such exceptional code
path, and after commit 4890b686f4 ("net: keep sk->sk_forward_alloc
as small as possible") we can't find much help there.
Drop the broken code.
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Mat Martineau <mathew.j.martineau@linux.intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
456bfd9dc8
commit
4aaa1685f7
@@ -328,15 +328,10 @@ static bool mptcp_rmem_schedule(struct sock *sk, struct sock *ssk, int size)
|
|||||||
|
|
||||||
amt = sk_mem_pages(size);
|
amt = sk_mem_pages(size);
|
||||||
amount = amt << PAGE_SHIFT;
|
amount = amt << PAGE_SHIFT;
|
||||||
msk->rmem_fwd_alloc += amount;
|
if (!__sk_mem_raise_allocated(sk, size, amt, SK_MEM_RECV))
|
||||||
if (!__sk_mem_raise_allocated(sk, size, amt, SK_MEM_RECV)) {
|
return false;
|
||||||
if (ssk->sk_forward_alloc < amount) {
|
|
||||||
msk->rmem_fwd_alloc -= amount;
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
ssk->sk_forward_alloc -= amount;
|
msk->rmem_fwd_alloc += amount;
|
||||||
}
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user