From: Tony Lu Date: Thu, 28 Oct 2021 07:13:45 +0000 (+0800) Subject: net/smc: Fix smc_link->llc_testlink_time overflow X-Git-Tag: accepted/tizen/unified/20230118.172025~6115^2~7^2~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c4a146c7cf5e8ad76231523b174d161bf152c6e7;p=platform%2Fkernel%2Flinux-rpi.git net/smc: Fix smc_link->llc_testlink_time overflow The value of llc_testlink_time is set to the value stored in net->ipv4.sysctl_tcp_keepalive_time when linkgroup init. The value of sysctl_tcp_keepalive_time is already jiffies, so we don't need to multiply by HZ, which would cause smc_link->llc_testlink_time overflow, and test_link send flood. Signed-off-by: Tony Lu Reviewed-by: Xuan Zhuo Reviewed-by: Wen Gu Signed-off-by: David S. Miller --- diff --git a/net/smc/smc_llc.c b/net/smc/smc_llc.c index 72f4b72..f1d3234 100644 --- a/net/smc/smc_llc.c +++ b/net/smc/smc_llc.c @@ -1822,7 +1822,7 @@ void smc_llc_link_active(struct smc_link *link) link->smcibdev->ibdev->name, link->ibport); link->state = SMC_LNK_ACTIVE; if (link->lgr->llc_testlink_time) { - link->llc_testlink_time = link->lgr->llc_testlink_time * HZ; + link->llc_testlink_time = link->lgr->llc_testlink_time; schedule_delayed_work(&link->llc_testlink_wrk, link->llc_testlink_time); }