* [PATCH net] mptcp: provide rmem[0] limit
@ 2020-11-08 18:49 Paolo Abeni
2020-11-09 17:20 ` [MPTCP] " Matthieu Baerts
0 siblings, 1 reply; 3+ messages in thread
From: Paolo Abeni @ 2020-11-08 18:49 UTC (permalink / raw)
To: netdev; +Cc: Mat Martineau, David S. Miller, Jakub Kicinski, mptcp
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(+)
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,
--
2.26.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [MPTCP] [PATCH net] mptcp: provide rmem[0] limit
2020-11-08 18:49 [PATCH net] mptcp: provide rmem[0] limit Paolo Abeni
@ 2020-11-09 17:20 ` Matthieu Baerts
2020-11-10 1:36 ` Jakub Kicinski
0 siblings, 1 reply; 3+ messages in thread
From: Matthieu Baerts @ 2020-11-09 17:20 UTC (permalink / raw)
To: Paolo Abeni, netdev; +Cc: David S. Miller, Jakub Kicinski, mptcp
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
--
Tessares | Belgium | Hybrid Access Solutions
www.tessares.net
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [MPTCP] [PATCH net] mptcp: provide rmem[0] limit
2020-11-09 17:20 ` [MPTCP] " Matthieu Baerts
@ 2020-11-10 1:36 ` Jakub Kicinski
0 siblings, 0 replies; 3+ messages in thread
From: Jakub Kicinski @ 2020-11-10 1:36 UTC (permalink / raw)
To: Matthieu Baerts; +Cc: Paolo Abeni, netdev, David S. Miller, mptcp
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!
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-11-10 1:36 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-08 18:49 [PATCH net] mptcp: provide rmem[0] limit Paolo Abeni
2020-11-09 17:20 ` [MPTCP] " Matthieu Baerts
2020-11-10 1:36 ` Jakub Kicinski
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).