]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
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)
committerAndrea Righi <andrea.righi@canonical.com>
Tue, 7 Dec 2021 06:32:53 +0000 (07:32 +0100)
commitf8606cd6df1b99fb91328ea991f39bbbb2baf9a1
treec0b3657137cdd6b20e430ea0ba5dca18ddf1963a
parent297ea7cee478dca115e407835639036f3b0e0069
rxrpc: Fix _usecs_to_jiffies() by using usecs_to_jiffies()

BugLink: https://bugs.launchpad.net/bugs/1951822
[ 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>
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
net/rxrpc/rtt.c