linux_dsm_epyc7002/drivers/net/ethernet/intel/e1000e
Jia-Ju Bai 0845d45e90 e1000e: Modify Tx/Rx configurations to avoid null pointer dereferences in e1000_open
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>
2015-08-18 14:06:06 -07:00
..
80003es2lan.c e1000e: Bump the version to 3.2.5 2015-06-03 04:13:39 -07:00
80003es2lan.h e1000e: Bump the version to 3.2.5 2015-06-03 04:13:39 -07:00
82571.c e1000e: Bump the version to 3.2.5 2015-06-03 04:13:39 -07:00
82571.h e1000e: Bump the version to 3.2.5 2015-06-03 04:13:39 -07:00
defines.h e1000e: Bump the version to 3.2.5 2015-06-03 04:13:39 -07:00
e1000.h e1000e: Bump the version to 3.2.5 2015-06-03 04:13:39 -07:00
ethtool.c e1000e: Bump the version to 3.2.5 2015-06-03 04:13:39 -07:00
hw.h e1000e: Bump the version to 3.2.5 2015-06-03 04:13:39 -07:00
ich8lan.c e1000e: i219 - k1 workaround for LPT is not required for SPT 2015-06-26 02:47:37 -07:00
ich8lan.h e1000e: Cosmetic changes 2015-08-05 16:53:47 -07:00
mac.c e1000e: Bump the version to 3.2.5 2015-06-03 04:13:39 -07:00
mac.h e1000e: Bump the version to 3.2.5 2015-06-03 04:13:39 -07:00
Makefile e1000e: Cleanup - Update GPL header and Copyright 2014-03-07 21:55:27 -08:00
manage.c e1000e: Bump the version to 3.2.5 2015-06-03 04:13:39 -07:00
manage.h e1000e: Bump the version to 3.2.5 2015-06-03 04:13:39 -07:00
netdev.c e1000e: Modify Tx/Rx configurations to avoid null pointer dereferences in e1000_open 2015-08-18 14:06:06 -07:00
nvm.c e1000e: Bump the version to 3.2.5 2015-06-03 04:13:39 -07:00
nvm.h e1000e: Bump the version to 3.2.5 2015-06-03 04:13:39 -07:00
param.c e1000e: Bump the version to 3.2.5 2015-06-03 04:13:39 -07:00
phy.c e1000e: Bump the version to 3.2.5 2015-06-03 04:13:39 -07:00
phy.h e1000e: Bump the version to 3.2.5 2015-06-03 04:13:39 -07:00
ptp.c e1000e: Bump the version to 3.2.5 2015-06-03 04:13:39 -07:00
regs.h e1000e: Cosmetic changes 2015-08-05 16:53:47 -07:00