numam-dpdk/drivers/net/enic
Hyong Youb Kim c655c547f9 net/enic: fix crash in secondary process
Both primary and secondary processes may call the queue start/stop,
link update handlers. These functions use the rte_eth_dev pointer
cached in the adapter private data (struct enic). But, this pointer is
valid only in the primary process, as rte_eth_dev addresses may differ
in different processes. Using that cached pointer in secondary
processes leads to a crash.

For the link update handler (enic_link_update), use the rte_eth_dev
pointer passed down from the rte layer as it is valid in the current
process. For the queue start/stop handlers (enic_start_wq and
friends), cache the rte_eth_dev_data pointer in the adapter private
data, and use that. rte_eth_dev_data is in shared memory and its
address is same across processes.

Fixes: 837e68ae94 ("net/enic: fix queue stop and start")
Fixes: cf8d9826b7 ("net/enic: extract code for checking link status")
Cc: stable@dpdk.org

Reported-by: Dirk-Holger Lenz <dirk.lenz@ng4t.com>
Signed-off-by: Hyong Youb Kim <hyonkim@cisco.com>
Tested-by: Dirk-Holger Lenz <dirk.lenz@ng4t.com>
Reviewed-by: John Daley <johndale@cisco.com>
2019-10-23 16:43:08 +02:00
..
base net/enic: remove flow count action support 2019-06-14 00:01:06 +09:00
enic_clsf.c net: add rte prefix to UDP structure 2019-05-24 13:34:46 +02:00
enic_compat.h net/enic: remove PMD log type references 2019-07-23 14:31:35 +02:00
enic_ethdev.c net/enic: fix crash in secondary process 2019-10-23 16:43:08 +02:00
enic_flow.c net/enic: remove PMD log type references 2019-07-23 14:31:35 +02:00
enic_main.c net/enic: fix crash in secondary process 2019-10-23 16:43:08 +02:00
enic_res.c net/enic: remove flow count action support 2019-06-14 00:01:06 +09:00
enic_res.h net/enic: remove unused functions 2019-03-08 17:52:22 +01:00
enic_rxtx_common.h net/enic: allow flow mark ID 0 2019-03-08 17:52:22 +01:00
enic_rxtx_vec_avx2.c net/enic: fix probe for secondary process 2019-10-23 16:43:08 +02:00
enic_rxtx.c net/enic: fix Tx prepare to set positive rte_errno 2019-06-13 23:54:30 +09:00
enic.h net/enic: fix crash in secondary process 2019-10-23 16:43:08 +02:00
Makefile net/enic: remove unused functions 2019-03-08 17:52:22 +01:00
meson.build net/enic: remove unused functions 2019-03-08 17:52:22 +01:00
rte_pmd_enic_version.map enic: move to drivers/net/ 2015-05-22 16:05:52 +02:00