mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-26 22:35:14 +07:00
0845d45e90
When e1000e_setup_rx_resources is failed in e1000_open, e1000e_free_tx_resources in "err_setup_rx" segment is executed. "writel(0, tx_ring->head)" statement in e1000_clean_tx_ring in e1000e_free_tx_resources will cause a null poonter dereference(crash), because "tx_ring->head" is only assigned in e1000_configure_tx in e1000_configure, but it is after e1000e_setup_rx_resources. This patch moves head/tail register writing to e1000_configure_tx/rx, which can fix this problem. It is inspired by igb_configure_tx_ring in the igb driver. Specially, thank Alexander Duyck for his valuable suggestion. Signed-off-by: Jia-Ju Bai <baijiaju1990@163.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> |
||
---|---|---|
.. | ||
80003es2lan.c | ||
80003es2lan.h | ||
82571.c | ||
82571.h | ||
defines.h | ||
e1000.h | ||
ethtool.c | ||
hw.h | ||
ich8lan.c | ||
ich8lan.h | ||
mac.c | ||
mac.h | ||
Makefile | ||
manage.c | ||
manage.h | ||
netdev.c | ||
nvm.c | ||
nvm.h | ||
param.c | ||
phy.c | ||
phy.h | ||
ptp.c | ||
regs.h |