linux_dsm_epyc7002/drivers/net/ethernet/intel
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
..
e1000 e1000: Replace e1000_free_frag with skb_free_frag 2015-05-12 10:39:27 -04:00
e1000e e1000e: Modify Tx/Rx configurations to avoid null pointer dereferences in e1000_open 2015-08-18 14:06:06 -07:00
fm10k fm10k: Fix missing braces after if statement 2015-06-17 14:21:41 -07:00
i40e i40e: Add AQ commands for NVM Update for X722 2015-08-05 16:53:46 -07:00
i40evf i40e/i40evf: Add TX/RX outer UDP checksum support for X722 2015-08-05 16:53:45 -07:00
igb igb: Fix a deadlock in igb_sriov_reinit 2015-08-18 14:06:05 -07:00
igbvf igbvf: use netif_carrier_off earlier when bringing if down 2015-03-20 17:45:12 -07:00
ixgb ixgb: call netif_carrier_off early on down 2015-03-20 17:41:52 -07:00
ixgbe ixgbe: Don't report flow director filter's status 2015-07-17 19:59:07 -07:00
ixgbevf ixgbevf: add support for reporting RSS key and hash table for X550 2015-07-23 05:01:44 -07:00
e100.c e100: Release skb when DMA mapping is failed in e100_xmit_prepare 2015-08-18 14:06:05 -07:00
Kconfig drivers/net: remove all references to obsolete Ethernet-HOWTO 2015-06-23 06:50:35 -07:00
Makefile fm10k: Add skeletal frame for Intel(R) FM10000 Ethernet Switch Host Interface Driver 2014-09-23 03:59:13 -07:00