Patch "net: stmmac: fix rx budget limit check" has been added to the 6.6-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

    net: stmmac: fix rx budget limit check

to the 6.6-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:
     net-stmmac-fix-rx-budget-limit-check.patch
and it can be found in the queue-6.6 subdirectory.

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



commit add6fbd3c26f25ef52a00533702c155323102579
Author: Baruch Siach <baruch@xxxxxxxxxx>
Date:   Mon Nov 13 19:42:49 2023 +0200

    net: stmmac: fix rx budget limit check
    
    [ Upstream commit fa02de9e75889915b554eda1964a631fd019973b ]
    
    The while loop condition verifies 'count < limit'. Neither value change
    before the 'count >= limit' check. As is this check is dead code. But
    code inspection reveals a code path that modifies 'count' and then goto
    'drain_data' and back to 'read_again'. So there is a need to verify
    count value sanity after 'read_again'.
    
    Move 'read_again' up to fix the count limit check.
    
    Fixes: ec222003bd94 ("net: stmmac: Prepare to add Split Header support")
    Signed-off-by: Baruch Siach <baruch@xxxxxxxxxx>
    Reviewed-by: Serge Semin <fancer.lancer@xxxxxxxxx>
    Link: https://lore.kernel.org/r/d9486296c3b6b12ab3a0515fcd47d56447a07bfc.1699897370.git.baruch@xxxxxxxxxx
    Signed-off-by: Jakub Kicinski <kuba@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
index 5801f4d50f951..53358015fbe5c 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
@@ -5302,10 +5302,10 @@ static int stmmac_rx(struct stmmac_priv *priv, int limit, u32 queue)
 			len = 0;
 		}
 
+read_again:
 		if (count >= limit)
 			break;
 
-read_again:
 		buf1_len = 0;
 		buf2_len = 0;
 		entry = next_entry;



[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