• Jiri Pirko's avatar
    net/mlx5e: Create separate devlink instance for ethernet auxiliary device · ee75f1fc
    Jiri Pirko authored
    The fact that devlink instance lock is held over mlx5 auxiliary devices
    probe and remove routines brought a need to conditionally take devlink
    instance lock there. The code is checking a MLX5E_LOCKED_FLOW flag
    in mlx5 priv struct.
    
    This is racy and may lead to access devlink objects without holding
    instance lock or deadlock.
    
    To avoid this, the only lock-wise sane solution is to make the
    devlink entities created by the auxiliary device independent on
    the original pci devlink instance. Create devlink instance for the
    auxiliary device and put the uplink port instance there alongside with
    the port health reporters.
    Signed-off-by: default avatarJiri Pirko <jiri@nvidia.com>
    Reviewed-by: default avatarJacob Keller <jacob.e.keller@intel.com>
    Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
    ee75f1fc
en.h 39.1 KB