In the Linux kernel, the following vulnerability has been resolved:
net/mlx5e: Skip restore TC rules for vport rep without loaded flag
During driver unload, unregisternetdev is called after unloading vport rep. So, the mlx5ereppriv is already freed while trying to get rpriv->netdev, or walk rpriv->tcht, which results in use-after-free. So add the checking to make sure access the data of vport rep which is still loaded.