]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
idpf: fix aux device unplugging when rdma is not supported by vport
authorLarysa Zaremba <larysa.zaremba@intel.com>
Mon, 17 Nov 2025 07:03:49 +0000 (08:03 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 17 Jan 2026 15:35:28 +0000 (16:35 +0100)
commit0ad6d6e50e9d8bf596cfe77a882ddc20b29f525a
tree105adbc4f6d9958b6dd1955cbf75341780439b44
parent258e7c55f9395b4711afa590fb0230911c602b8c
idpf: fix aux device unplugging when rdma is not supported by vport

[ Upstream commit 4648fb2f2e7210c53b85220ee07d42d1e4bae3f9 ]

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 <madhu.chittim@intel.com>
Signed-off-by: Larysa Zaremba <larysa.zaremba@intel.com>
Reviewed-by: Paul Menzel <pmenzel@molgen.mpg.de>
Reviewed-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com>
Tested-by: Krishneil Singh <krishneil.k.singh@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/intel/idpf/idpf_idc.c