Patch "net: lantiq_xrx200: fix lock under memory pressure" has been added to the 5.19-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: lantiq_xrx200: fix lock under memory pressure

to the 5.19-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-lantiq_xrx200-fix-lock-under-memory-pressure.patch
and it can be found in the queue-5.19 subdirectory.

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



commit 923e36189a7705f3b700a55375d8612f31755dce
Author: Aleksander Jan Bajkowski <olek2@xxxxx>
Date:   Wed Aug 24 23:54:07 2022 +0200

    net: lantiq_xrx200: fix lock under memory pressure
    
    [ Upstream commit c4b6e9341f930e4dd089231c0414758f5f1f9dbd ]
    
    When the xrx200_hw_receive() function returns -ENOMEM, the NAPI poll
    function immediately returns an error.
    This is incorrect for two reasons:
    * the function terminates without enabling interrupts or scheduling NAPI,
    * the error code (-ENOMEM) is returned instead of the number of received
    packets.
    
    After the first memory allocation failure occurs, packet reception is
    locked due to disabled interrupts from DMA..
    
    Fixes: fe1a56420cf2 ("net: lantiq: Add Lantiq / Intel VRX200 Ethernet driver")
    Signed-off-by: Aleksander Jan Bajkowski <olek2@xxxxx>
    Signed-off-by: Jakub Kicinski <kuba@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/net/ethernet/lantiq_xrx200.c b/drivers/net/ethernet/lantiq_xrx200.c
index 89314b645c822..25adce7f0c7c0 100644
--- a/drivers/net/ethernet/lantiq_xrx200.c
+++ b/drivers/net/ethernet/lantiq_xrx200.c
@@ -294,7 +294,7 @@ static int xrx200_poll_rx(struct napi_struct *napi, int budget)
 			if (ret == XRX200_DMA_PACKET_IN_PROGRESS)
 				continue;
 			if (ret != XRX200_DMA_PACKET_COMPLETE)
-				return ret;
+				break;
 			rx++;
 		} else {
 			break;



[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