Skip to content

Commit 989ef49

Browse files
Paolo Abenikuba-moo
authored andcommitted
mptcp: provide rmem[0] limit
The mptcp proto struct currently does not provide the required limit for forward memory scheduling. Under pressure sk_rmem_schedule() will unconditionally try to use such field and will oops. Address the issue inheriting the tcp limit, as we already do for the wmem one. Fixes: 9c3f94e ("mptcp: add missing memory scheduling in the rx path") Signed-off-by: Paolo Abeni <pabeni@redhat.com> Reviewed-by: Matthieu Baerts <matthieu.baerts@tessares.net> Link: https://lore.kernel.org/r/37af798bd46f402fb7c79f57ebbdd00614f5d7fa.1604861097.git.pabeni@redhat.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
1 parent 16eb0eb commit 989ef49

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

net/mptcp/protocol.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2467,6 +2467,7 @@ static struct proto mptcp_prot = {
24672467
.memory_pressure = &tcp_memory_pressure,
24682468
.stream_memory_free = mptcp_memory_free,
24692469
.sysctl_wmem_offset = offsetof(struct net, ipv4.sysctl_tcp_wmem),
2470+
.sysctl_rmem_offset = offsetof(struct net, ipv4.sysctl_tcp_rmem),
24702471
.sysctl_mem = sysctl_tcp_mem,
24712472
.obj_size = sizeof(struct mptcp_sock),
24722473
.slab_flags = SLAB_TYPESAFE_BY_RCU,

0 commit comments

Comments
 (0)