Patch "rxrpc: Fix _usecs_to_jiffies() by using usecs_to_jiffies()" has been added to the 5.14-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    rxrpc: Fix _usecs_to_jiffies() by using usecs_to_jiffies()

to the 5.14-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     rxrpc-fix-_usecs_to_jiffies-by-using-usecs_to_jiffie.patch
and it can be found in the queue-5.14 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 9594712868196af44572594863ba180d615798ed
Author: Jiasheng Jiang <jiasheng@xxxxxxxxxxx>
Date:   Fri Sep 24 03:18:37 2021 +0000

    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@xxxxxxxxxxx>
    Signed-off-by: David S. Miller <davem@xxxxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/net/rxrpc/rtt.c b/net/rxrpc/rtt.c
index 4e565eeab4260..be61d6f5be8d1 100644
--- a/net/rxrpc/rtt.c
+++ b/net/rxrpc/rtt.c
@@ -22,7 +22,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)



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux