Skip to content

Commit eaea2da

Browse files
Daniel Borkmanndavem330
authored andcommitted
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>
1 parent 8f61059 commit eaea2da

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

‎net/sctp/sysctl.c‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -424,8 +424,9 @@ static int proc_sctp_do_alpha_beta(struct ctl_table *ctl, int write,
424424
void __user *buffer, size_t *lenp,
425425
loff_t *ppos)
426426
{
427-
pr_warn_once("Changing rto_alpha or rto_beta may lead to "
428-
"suboptimal rtt/srtt estimations!\n");
427+
if (write)
428+
pr_warn_once("Changing rto_alpha or rto_beta may lead to "
429+
"suboptimal rtt/srtt estimations!\n");
429430

430431
return proc_dointvec_minmax(ctl, write, buffer, lenp, ppos);
431432
}

0 commit comments

Comments
 (0)