Add the missing assignment to preclude NULL pointer dereference that has
happened in the context of the secondary process at the dev close stage.

Fixes: 5313b441d8ae ("net/sfc: separate adapter primary process and shared 
data")
Cc: [email protected]

Signed-off-by: Ivan Malov <[email protected]>
Reviewed-by: Viacheslav Galaktionov <[email protected]>
---
 drivers/net/sfc/sfc_ethdev.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/sfc/sfc_ethdev.c b/drivers/net/sfc/sfc_ethdev.c
index 6be91789cf..13619b4b9a 100644
--- a/drivers/net/sfc/sfc_ethdev.c
+++ b/drivers/net/sfc/sfc_ethdev.c
@@ -3224,6 +3224,7 @@ sfc_eth_dev_secondary_init(struct rte_eth_dev *dev, 
uint32_t logtype_main)
 
        sap->dp_rx = dp_rx;
        sap->dp_tx = dp_tx;
+       sap->shared = sas;
 
        dev->process_private = sap;
        dev->rx_pkt_burst = dp_rx->pkt_burst;
-- 
2.47.3

Reply via email to