rxrpc: Fix _usecs_to_jiffies() by using usecs_to_jiffies()
authorJiasheng Jiang <jiasheng@iscas.ac.cn>
Fri, 24 Sep 2021 03:18:37 +0000 (03:18 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 18 Nov 2021 18:16:25 +0000 (19:16 +0100)
commiteade470b4351f9989cac161ee96531a40fa19825
tree6cfd6d7a6045635bffeece73e22decce24692766
parent9fcd75ee91592bc61f19adedc26c5a40ae88352e
rxrpc: Fix _usecs_to_jiffies() by using usecs_to_jiffies()

[ Upstream commit acde891c243c1ed85b19d4d5042bdf00914f5739 ]

Directly using _usecs_to_jiffies() might be unsafe, so it's
better to use usecs_to_jiffies() instead.
Because we can see that the result of _usecs_to_jiffies()
could be larger than MAX_JIFFY_OFFSET values without the
check of the input.

Fixes: c410bf01933e ("Fix the excessive initial retransmission timeout")
Signed-off-by: Jiasheng Jiang <jiasheng@iscas.ac.cn>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/rxrpc/rtt.c