Date: Wed, 12 Dec 2018 12:34:30 +0000 (UTC) From: Hans Petter Selasky <hselasky@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r341953 - stable/12/sys/dev/mlx5/mlx5_ib Message-ID: <201812121234.wBCCYUUD086754@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: hselasky Date: Wed Dec 12 12:34:30 2018 New Revision: 341953 URL: https://svnweb.freebsd.org/changeset/base/341953 Log: MFC r341570: 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. Sponsored by: Mellanox Technologies Modified: stable/12/sys/dev/mlx5/mlx5_ib/mlx5_ib_cong.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/mlx5/mlx5_ib/mlx5_ib_cong.c ============================================================================== --- stable/12/sys/dev/mlx5/mlx5_ib/mlx5_ib_cong.c Wed Dec 12 12:33:17 2018 (r341952) +++ stable/12/sys/dev/mlx5/mlx5_ib/mlx5_ib_cong.c Wed Dec 12 12:34:30 2018 (r341953) @@ -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); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201812121234.wBCCYUUD086754>