/[packages]/backports/8/kernel/current/SOURCES/net-lantiq_xrx200-fix-lock-under-memory-pressure.patch
ViewVC logotype

Contents of /backports/8/kernel/current/SOURCES/net-lantiq_xrx200-fix-lock-under-memory-pressure.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1881590 - (show annotations) (download)
Mon Aug 29 03:49:40 2022 UTC (19 months, 3 weeks ago) by tmb
File size: 1536 byte(s)
- add current -stable queue
- io_uring: fix issue with io_write() not always undoing sb_start_write()
- HID: input: fix uclogic tablets


1 From 923e36189a7705f3b700a55375d8612f31755dce Mon Sep 17 00:00:00 2001
2 From: Sasha Levin <sashal@kernel.org>
3 Date: Wed, 24 Aug 2022 23:54:07 +0200
4 Subject: net: lantiq_xrx200: fix lock under memory pressure
5
6 From: Aleksander Jan Bajkowski <olek2@wp.pl>
7
8 [ Upstream commit c4b6e9341f930e4dd089231c0414758f5f1f9dbd ]
9
10 When the xrx200_hw_receive() function returns -ENOMEM, the NAPI poll
11 function immediately returns an error.
12 This is incorrect for two reasons:
13 * the function terminates without enabling interrupts or scheduling NAPI,
14 * the error code (-ENOMEM) is returned instead of the number of received
15 packets.
16
17 After the first memory allocation failure occurs, packet reception is
18 locked due to disabled interrupts from DMA..
19
20 Fixes: fe1a56420cf2 ("net: lantiq: Add Lantiq / Intel VRX200 Ethernet driver")
21 Signed-off-by: Aleksander Jan Bajkowski <olek2@wp.pl>
22 Signed-off-by: Jakub Kicinski <kuba@kernel.org>
23 Signed-off-by: Sasha Levin <sashal@kernel.org>
24 ---
25 drivers/net/ethernet/lantiq_xrx200.c | 2 +-
26 1 file changed, 1 insertion(+), 1 deletion(-)
27
28 diff --git a/drivers/net/ethernet/lantiq_xrx200.c b/drivers/net/ethernet/lantiq_xrx200.c
29 index 89314b645c822..25adce7f0c7c0 100644
30 --- a/drivers/net/ethernet/lantiq_xrx200.c
31 +++ b/drivers/net/ethernet/lantiq_xrx200.c
32 @@ -294,7 +294,7 @@ static int xrx200_poll_rx(struct napi_struct *napi, int budget)
33 if (ret == XRX200_DMA_PACKET_IN_PROGRESS)
34 continue;
35 if (ret != XRX200_DMA_PACKET_COMPLETE)
36 - return ret;
37 + break;
38 rx++;
39 } else {
40 break;
41 --
42 2.35.1
43

  ViewVC Help
Powered by ViewVC 1.1.30