]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
MFC r341560:
authorhselasky <hselasky@FreeBSD.org>
Wed, 12 Dec 2018 12:22:40 +0000 (12:22 +0000)
committerhselasky <hselasky@FreeBSD.org>
Wed, 12 Dec 2018 12:22:40 +0000 (12:22 +0000)
commit6836330b1e017b8611c57ff4bc094ae5036dc3de
treecf8af4b3596d70c3e801810a14c56ab1dc7e410c
parent15593da3ef5c9156affe28f247b563fe9bd42576
MFC r341560:
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().

Sponsored by:   Mellanox Technologies
sys/dev/mlx5/driver.h
sys/dev/mlx5/mlx5_core/mlx5_health.c
sys/dev/mlx5/mlx5_core/mlx5_main.c