HomeFreeBSD

mlx5: Fix use-after-free in self-healing flow

Description

mlx5: Fix use-after-free in self-healing flow

When the mlx5 health mechanism detects a problem while the driver
is in the middle of init_one or remove_one, the driver needs to prevent
the health mechanism from scheduling future work; if future work
is scheduled, there is a problem with use-after-free: the system WQ
tries to run the work item (which has been freed) at the scheduled
future time.

Prevent this by disabling work item scheduling in the health mechanism
when the driver is in the middle of init_one() or remove_one().

Approved by: hselasky (mentor)
MFC after: 1 week
Sponsored by: Mellanox Technologies

Details

Provenance
slavashAuthored on
Parents
rS341559: mlx5: Move hw.mlx5 node definition to mlx5_core.
Branches
Unknown
Tags
Unknown