Skip to content
Commit 4eebf66c authored by Sieng-Piaw Liew's avatar Sieng-Piaw Liew Committed by Dong Chenchen
Browse files

atl1c: Work around the DMA RX overflow issue

mainline inclusion
from mainline-v6.7-rc1
commit 86565682e9053e5deb128193ea9e88531bbae9cf
category: bugfix
bugzilla: 190056, https://gitee.com/src-openeuler/kernel/issues/I9REDN
CVE: CVE-2023-52834

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=86565682e9053e5deb128193ea9e88531bbae9cf



--------------------------------

This is based on alx driver commit 881d0327 ("net: alx: Work around
the DMA RX overflow issue").

The alx and atl1c drivers had RX overflow error which was why a custom
allocator was created to avoid certain addresses. The simpler workaround
then created for alx driver, but not for atl1c due to lack of tester.

Instead of using a custom allocator, check the allocated skb address and
use skb_reserve() to move away from problematic 0x...fc0 address.

Tested on AR8131 on Acer 4540.

Signed-off-by: default avatarSieng-Piaw Liew <liew.s.piaw@gmail.com>
Link: https://lore.kernel.org/r/20230912010711.12036-1-liew.s.piaw@gmail.com


Signed-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
Conflicts:
	drivers/net/ethernet/atheros/atl1c/atl1c.h
	drivers/net/ethernet/atheros/atl1c/atl1c_main.c
[commit 8042824a and 057f4af2 support multiple rx queues for
atk1c driver, which lead to context conflicts. commit a9d6df64
use napi_alloc_skb() to optimize performance in NAPI context, which
not merged]
Signed-off-by: default avatarDong Chenchen <dongchenchen2@huawei.com>
parent 23ae7e1b
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment