Patch "igc: Fix launchtime before start of cycle" has been added to the 5.15-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

    igc: Fix launchtime before start of cycle

to the 5.15-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:
     igc-fix-launchtime-before-start-of-cycle.patch
and it can be found in the queue-5.15 subdirectory.

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



commit b12ced94910b133fa504dc2c81a9f876f1a96c84
Author: Florian Kauer <florian.kauer@xxxxxxxxxxxxx>
Date:   Wed Jun 14 16:07:13 2023 +0200

    igc: Fix launchtime before start of cycle
    
    [ Upstream commit c1bca9ac0bcb355be11354c2e68bc7bf31f5ac5a ]
    
    It is possible (verified on a running system) that frames are processed
    by igc_tx_launchtime with a txtime before the start of the cycle
    (baset_est).
    
    However, the result of txtime - baset_est is written into a u32,
    leading to a wrap around to a positive number. The following
    launchtime > 0 check will only branch to executing launchtime = 0
    if launchtime is already 0.
    
    Fix it by using a s32 before checking launchtime > 0.
    
    Fixes: db0b124f02ba ("igc: Enhance Qbv scheduling by using first flag bit")
    Signed-off-by: Florian Kauer <florian.kauer@xxxxxxxxxxxxx>
    Reviewed-by: Kurt Kanzenbach <kurt@xxxxxxxxxxxxx>
    Tested-by: Naama Meir <naamax.meir@xxxxxxxxxxxxxxx>
    Signed-off-by: Tony Nguyen <anthony.l.nguyen@xxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/net/ethernet/intel/igc/igc_main.c b/drivers/net/ethernet/intel/igc/igc_main.c
index e5cbf867034e3..491b80407df49 100644
--- a/drivers/net/ethernet/intel/igc/igc_main.c
+++ b/drivers/net/ethernet/intel/igc/igc_main.c
@@ -1013,7 +1013,7 @@ static __le32 igc_tx_launchtime(struct igc_ring *ring, ktime_t txtime,
 	ktime_t base_time = adapter->base_time;
 	ktime_t now = ktime_get_clocktai();
 	ktime_t baset_est, end_of_cycle;
-	u32 launchtime;
+	s32 launchtime;
 	s64 n;
 
 	n = div64_s64(ktime_sub_ns(now, base_time), cycle_time);



[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