> -----Original Message-----
> From: Intel-wired-lan <[email protected]> On Behalf
> Of Larysa Zaremba
> Sent: Monday, November 17, 2025 8:04 AM
> To: Nguyen, Anthony L <[email protected]>; intel-wired-
> [email protected]
> Cc: Zaremba, Larysa <[email protected]>; Kitszel, Przemyslaw
> <[email protected]>; Andrew Lunn <[email protected]>;
> David S. Miller <[email protected]>; Eric Dumazet
> <[email protected]>; Jakub Kicinski <[email protected]>; Paolo Abeni
> <[email protected]>; [email protected]; linux-
> [email protected]; Tantilov, Emil S <[email protected]>;
> Chittim, Madhu <[email protected]>; Hay, Joshua A
> <[email protected]>
> Subject: [Intel-wired-lan] [PATCH iwl-net] idpf: fix aux device
> unplugging when rdma is not supported by vport
> 
> If vport flags do not contain VIRTCHNL2_VPORT_ENABLE_RDMA, driver does
> not allocate vdev_info for this vport. This leads to kernel NULL
> pointer dereference in idpf_idc_vport_dev_down(), which references
> vdev_info for every vport regardless.
> 
> Check, if vdev_info was ever allocated before unplugging aux device.
> 
> Fixes: be91128c579c ("idpf: implement RDMA vport auxiliary dev create,
> init, and destroy")
> Reviewed-by: Madhu Chittim <[email protected]>
> Signed-off-by: Larysa Zaremba <[email protected]>
> ---
>  drivers/net/ethernet/intel/idpf/idpf_idc.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/net/ethernet/intel/idpf/idpf_idc.c
> b/drivers/net/ethernet/intel/idpf/idpf_idc.c
> index c1b963f6bfad..4b1037eb2623 100644
> --- a/drivers/net/ethernet/intel/idpf/idpf_idc.c
> +++ b/drivers/net/ethernet/intel/idpf/idpf_idc.c
> @@ -322,7 +322,7 @@ static void idpf_idc_vport_dev_down(struct
> idpf_adapter *adapter)
>       for (i = 0; i < adapter->num_alloc_vports; i++) {
>               struct idpf_vport *vport = adapter->vports[i];
> 
> -             if (!vport)
> +             if (!vport || !vport->vdev_info)
>                       continue;
> 
>               idpf_unplug_aux_dev(vport->vdev_info->adev);
> --
> 2.47.0

Reviewed-by: Aleksandr Loktionov <[email protected]>

Reply via email to