From: Daniel Borkmann Date: Mon, 30 Jun 2014 11:52:09 +0000 (+0200) Subject: net: sctp: only warn in proc_sctp_do_alpha_beta if write X-Git-Tag: v3.17-rc1~106^2~232^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=eaea2da7286ebc56d557b40ad7e59e715a84e4a0;p=platform%2Fkernel%2Flinux-exynos.git 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 Signed-off-by: Daniel Borkmann Reviewed-by: Jiri Pirko Signed-off-by: David S. Miller --- diff --git a/net/sctp/sysctl.c b/net/sctp/sysctl.c index 12c7e01..2e9ada1 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, void __user *buffer, size_t *lenp, loff_t *ppos) { - pr_warn_once("Changing rto_alpha or rto_beta may lead to " - "suboptimal rtt/srtt estimations!\n"); + if (write) + 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); }