linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
To: Firo Yang <firo.yang@suse.com>
Cc: vyasevich@gmail.com, nhorman@tuxdriver.com, mkubecek@suse.com,
	davem@davemloft.net, edumazet@google.com, kuba@kernel.org,
	pabeni@redhat.com, linux-sctp@vger.kernel.org,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	firogm@gmail.com
Subject: Re: [PATCH v2 1/1] sctp: sysctl: make extra pointers netns aware
Date: Fri, 25 Nov 2022 09:22:38 -0300	[thread overview]
Message-ID: <Y4CzjgncdsrEe8tg@t14s.localdomain> (raw)
In-Reply-To: <20221125121127.40815-1-firo.yang@suse.com>

On Fri, Nov 25, 2022 at 08:11:27PM +0800, Firo Yang wrote:
> Recently, a customer reported that from their container whose
> net namespace is different to the host's init_net, they can't set
> the container's net.sctp.rto_max to any value smaller than
> init_net.sctp.rto_min.
> 
> For instance,
> Host:
> sudo sysctl net.sctp.rto_min
> net.sctp.rto_min = 1000
> 
> Container:
> echo 100 > /mnt/proc-net/sctp/rto_min
> echo 400 > /mnt/proc-net/sctp/rto_max
> echo: write error: Invalid argument
> 
> This is caused by the check made from this'commit 4f3fdf3bc59c
> ("sctp: add check rto_min and rto_max in sysctl")'
> When validating the input value, it's always referring the boundary
> value set for the init_net namespace.
> 
> Having container's rto_max smaller than host's init_net.sctp.rto_min
> does make sense. Consider that the rto between two containers on the
> same host is very likely smaller than it for two hosts.
> 
> So to fix this problem, as suggested by Marcelo, this patch makes the
> extra pointers of rto_min, rto_max, pf_retrans, and ps_retrans point
> to the corresponding variables from the newly created net namespace while
> the new net namespace is being registered in sctp_sysctl_net_register.
> 
> Fixes: 4f3fdf3bc59c ("sctp: add check rto_min and rto_max in sysctl")
> Reviewed-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
> Signed-off-by: Firo Yang <firo.yang@suse.com>

and
Acked-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>

Thanks Firo.


  reply	other threads:[~2022-11-25 12:22 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-25 12:11 [PATCH v2 1/1] sctp: sysctl: make extra pointers netns aware Firo Yang
2022-11-25 12:22 ` Marcelo Ricardo Leitner [this message]
2022-11-30  4:48 ` Jakub Kicinski
2022-12-01  4:11   ` Firo Yang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Y4CzjgncdsrEe8tg@t14s.localdomain \
    --to=marcelo.leitner@gmail.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=firo.yang@suse.com \
    --cc=firogm@gmail.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sctp@vger.kernel.org \
    --cc=mkubecek@suse.com \
    --cc=netdev@vger.kernel.org \
    --cc=nhorman@tuxdriver.com \
    --cc=pabeni@redhat.com \
    --cc=vyasevich@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).