Message ID | 37af798bd46f402fb7c79f57ebbdd00614f5d7fa.1604861097.git.pabeni@redhat.com |
---|---|
State | Accepted |
Delegated to: | David Miller |
Headers | show |
Series | [net] mptcp: provide rmem[0] limit | expand |
Context | Check | Description |
---|---|---|
jkicinski/cover_letter | success | Link |
jkicinski/fixes_present | success | Link |
jkicinski/patch_count | success | Link |
jkicinski/tree_selection | success | Clearly marked for net |
jkicinski/subject_prefix | success | Link |
jkicinski/source_inline | success | Was 0 now: 0 |
jkicinski/verify_signedoff | success | Link |
jkicinski/module_param | success | Was 0 now: 0 |
jkicinski/build_32bit | success | Errors and warnings before: 3 this patch: 3 |
jkicinski/kdoc | success | Errors and warnings before: 0 this patch: 0 |
jkicinski/verify_fixes | fail | Link |
jkicinski/checkpatch | success | total: 0 errors, 0 warnings, 0 checks, 7 lines checked |
jkicinski/build_allmodconfig_warn | success | Errors and warnings before: 3 this patch: 3 |
jkicinski/header_inline | success | Link |
jkicinski/stable | success | Stable not CCed |
Hi Paolo, On 08/11/2020 19:49, Paolo Abeni wrote: > 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: ("mptcp: add missing memory scheduling in the rx path") > Signed-off-by: Paolo Abeni <pabeni@redhat.com> Good catch, thank you for this patch! Reviewed-by: Matthieu Baerts <matthieu.baerts@tessares.net> Cheers, Matt
On Mon, 9 Nov 2020 18:20:50 +0100 Matthieu Baerts wrote: > On 08/11/2020 19:49, Paolo Abeni wrote: > > 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: ("mptcp: add missing memory scheduling in the rx path") > > Signed-off-by: Paolo Abeni <pabeni@redhat.com> > > Good catch, thank you for this patch! > > Reviewed-by: Matthieu Baerts <matthieu.baerts@tessares.net> Fixed up the tag and applied, thanks!
diff --git a/net/mptcp/protocol.c b/net/mptcp/protocol.c index e7419fd15d84..88f2a7a0ccb8 100644 --- a/net/mptcp/protocol.c +++ b/net/mptcp/protocol.c @@ -2467,6 +2467,7 @@ static struct proto mptcp_prot = { .memory_pressure = &tcp_memory_pressure, .stream_memory_free = mptcp_memory_free, .sysctl_wmem_offset = offsetof(struct net, ipv4.sysctl_tcp_wmem), + .sysctl_rmem_offset = offsetof(struct net, ipv4.sysctl_tcp_rmem), .sysctl_mem = sysctl_tcp_mem, .obj_size = sizeof(struct mptcp_sock), .slab_flags = SLAB_TYPESAFE_BY_RCU,
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: ("mptcp: add missing memory scheduling in the rx path") Signed-off-by: Paolo Abeni <pabeni@redhat.com> --- net/mptcp/protocol.c | 1 + 1 file changed, 1 insertion(+)