idpf: fix driver probe with CONFIG_LOCKDEP=y
Subsystems (2)
PATCH 1/1 idpf: fix driver probe with CONFIG_LOCKDEP=y
At the moment of idpf_vport_queues_alloc() when an interface gets opened for the first time, rxq->q_vector is NULL yet. But idpf_xdp_rxq_assign_prog() dereferences it in case of enabled lockdep.
Just move idpf_xdp_copy_prog_to_rqs() from the abovementioned function to idpf_rx_bufs_init_all(), where rxq->q_vector is always initialized already.
Signed-off-by Alexander Lobakin <[email protected]>
---
To Tony: this is a hotfix for
"idpf: implement XDP_SETUP_PROG in ndo_bpf for splitq"
where this call was introduced, please squash.
--- drivers/net/ethernet/intel/idpf/idpf_txrx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/net/ethernet/intel/idpf/idpf_txrx.c +2 -2
@@ -832,6 +832,8 @@ int idpf_rx_bufs_init_all(struct idpf_vport *vport)bool split =idpf_is_queue_model_split (vport->rxq_model);int i, j, err; +idpf_xdp_copy_prog_to_rqs (vport, vport->xdp_prog); +for (i =0 ; i < vport->num_rxq_grp; i++) {struct idpf_rxq_group *rx_qgrp = &vport->rxq_grps[i];u32 truesize =0 ;
@@ -1680,8 +1682,6 @@ int idpf_vport_queues_alloc(struct idpf_vport *vport)if (err) goto err_out; -idpf_xdp_copy_prog_to_rqs (vport, vport->xdp_prog); -return 0 ; err_out:
Signature · 1 line
2.50.0