aboutsummaryrefslogtreecommitdiffstats
path: root/net/sctp
diff options
context:
space:
mode:
authorDaniel Borkmann <dborkman@redhat.com>2014-06-30 07:52:09 -0400
committerDavid S. Miller <davem@davemloft.net>2014-07-02 21:44:07 -0400
commiteaea2da7286ebc56d557b40ad7e59e715a84e4a0 (patch)
tree1507ed91bbbaec02273bf493fa13c2d0a383b6be /net/sctp
parent8f61059a96c2a29c1cc5a39dfe23d06ef5b4b065 (diff)
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: Jiri Pirko <jpirko@redhat.com> Signed-off-by: Daniel Borkmann <dborkman@redhat.com> Reviewed-by: Jiri Pirko <jiri@resnulli.us> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sctp')
-rw-r--r--net/sctp/sysctl.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/net/sctp/sysctl.c b/net/sctp/sysctl.c
index 12c7e01c2677..2e9ada10fd84 100644
--- a/net/sctp/sysctl.c
+++ b/net/sctp/sysctl.c
@@ -424,8 +424,9 @@ static int proc_sctp_do_alpha_beta(struct ctl_table *ctl, int write,
424 void __user *buffer, size_t *lenp, 424 void __user *buffer, size_t *lenp,
425 loff_t *ppos) 425 loff_t *ppos)
426{ 426{
427 pr_warn_once("Changing rto_alpha or rto_beta may lead to " 427 if (write)
428 "suboptimal rtt/srtt estimations!\n"); 428 pr_warn_once("Changing rto_alpha or rto_beta may lead to "
429 "suboptimal rtt/srtt estimations!\n");
429 430
430 return proc_dointvec_minmax(ctl, write, buffer, lenp, ppos); 431 return proc_dointvec_minmax(ctl, write, buffer, lenp, ppos);
431} 432}