aboutsummaryrefslogtreecommitdiffstats
path: root/net/tipc
diff options
context:
space:
mode:
authorJia-Ju Bai <baijiaju1990@163.com>2015-08-05 18:16:10 +0800
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>2015-08-18 14:06:06 -0700
commit0845d45e900cad5f7f855a7a6a21c33477800b1f (patch)
tree4cefdd69e0cb00173546180b57d6714cfc3ab775 /net/tipc
parentigb: Fix a deadlock in igb_sriov_reinit (diff)
downloadlinux-dev-0845d45e900cad5f7f855a7a6a21c33477800b1f.tar.xz
linux-dev-0845d45e900cad5f7f855a7a6a21c33477800b1f.zip
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>
Diffstat (limited to 'net/tipc')
0 files changed, 0 insertions, 0 deletions