svn commit: r341570 - head/sys/dev/mlx5/mlx5_ib
Slava Shwartsman
slavash at FreeBSD.org
Wed Dec 5 13:48:41 UTC 2018
Author: slavash
Date: Wed Dec 5 13:48:39 2018
New Revision: 341570
URL: https://svnweb.freebsd.org/changeset/base/341570
Log:
mlx5ib: Make sure the congestion work timer does not escape the drain procedure.
If the mlx5_ib_read_cong_stats() function was running when mlx5ib was unloaded,
because this function unconditionally restarts the timer, the timer can still
be pending after the delayed work has been cancelled. To fix this simply loop
on the delayed work cancel procedure as long as it returns non-zero.
Submitted by: hselasky@
Approved by: hselasky (mentor)
MFC after: 1 week
Sponsored by: Mellanox Technologies
Modified:
head/sys/dev/mlx5/mlx5_ib/mlx5_ib_cong.c
Modified: head/sys/dev/mlx5/mlx5_ib/mlx5_ib_cong.c
==============================================================================
--- head/sys/dev/mlx5/mlx5_ib/mlx5_ib_cong.c Wed Dec 5 13:48:10 2018 (r341569)
+++ head/sys/dev/mlx5/mlx5_ib/mlx5_ib_cong.c Wed Dec 5 13:48:39 2018 (r341570)
@@ -393,7 +393,8 @@ void
mlx5_ib_cleanup_congestion(struct mlx5_ib_dev *dev)
{
- cancel_delayed_work_sync(&dev->congestion.dwork);
+ while (cancel_delayed_work_sync(&dev->congestion.dwork))
+ ;
sysctl_ctx_free(&dev->congestion.ctx);
sx_destroy(&dev->congestion.lock);
}
More information about the svn-src-head
mailing list