Commit eaea2da7 authored by Daniel Borkmann's avatar Daniel Borkmann Committed by David S. Miller

net: sctp: only warn in proc_sctp_do_alpha_beta if write

Only warn if the value is written to alpha or beta. We don't care
emitting a one-time warning when only reading it.
Reported-by: default avatarJiri Pirko <jpirko@redhat.com>
Signed-off-by: default avatarDaniel Borkmann <dborkman@redhat.com>
Reviewed-by: default avatarJiri Pirko <jiri@resnulli.us>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 8f61059a
...@@ -424,8 +424,9 @@ static int proc_sctp_do_alpha_beta(struct ctl_table *ctl, int write, ...@@ -424,8 +424,9 @@ static int proc_sctp_do_alpha_beta(struct ctl_table *ctl, int write,
void __user *buffer, size_t *lenp, void __user *buffer, size_t *lenp,
loff_t *ppos) loff_t *ppos)
{ {
pr_warn_once("Changing rto_alpha or rto_beta may lead to " if (write)
"suboptimal rtt/srtt estimations!\n"); pr_warn_once("Changing rto_alpha or rto_beta may lead to "
"suboptimal rtt/srtt estimations!\n");
return proc_dointvec_minmax(ctl, write, buffer, lenp, ppos); return proc_dointvec_minmax(ctl, write, buffer, lenp, ppos);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment