Loading
r8169: improve rtl_tx
mainline inclusion from mainline-v5.11-rc1 commit ca1ab89c category: bugfix bugzilla: https://gitee.com/src-openeuler/kernel/issues/IA6SF4 CVE: CVE-2024-38586 Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=ca1ab89cd2d654661f559bd83ad9fc7323cb6c86 --------------------------- We can simplify the for() condition and eliminate variable tx_left. The change also considers that tp->cur_tx may be incremented by a racing rtl8169_start_xmit(). In addition replace the write to tp->dirty_tx and the following smp_mb() with an equivalent call to smp_store_mb(). This implicitly adds a WRITE_ONCE() to the write. Signed-off-by:Heiner Kallweit <hkallweit1@gmail.com> Link: https://lore.kernel.org/r/c2e19e5e-3d3f-d663-af32-13c3374f5def@gmail.com Signed-off-by:
Jakub Kicinski <kuba@kernel.org> Conflicts: drivers/net/ethernet/realtek/r8169_main.c [We did not backport f1d54705.] Signed-off-by:
Liu Jian <liujian56@huawei.com>