mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-28 03:40:04 +00:00
rxrpc: Fix _usecs_to_jiffies() by using usecs_to_jiffies()
[ Upstream commitacde891c24
] 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:c410bf0193
("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>
This commit is contained in:
parent
d4cd7a167c
commit
674637270e
1 changed files with 1 additions and 1 deletions
|
@ -23,7 +23,7 @@ static u32 rxrpc_rto_min_us(struct rxrpc_peer *peer)
|
|||
|
||||
static u32 __rxrpc_set_rto(const struct rxrpc_peer *peer)
|
||||
{
|
||||
return _usecs_to_jiffies((peer->srtt_us >> 3) + peer->rttvar_us);
|
||||
return usecs_to_jiffies((peer->srtt_us >> 3) + peer->rttvar_us);
|
||||
}
|
||||
|
||||
static u32 rxrpc_bound_rto(u32 rto)
|
||||
|
|
Loading…
Reference in a new issue