diff options
author | Selvin Xavier <selvin.xavier@broadcom.com> | 2018-10-08 03:28:03 -0700 |
---|---|---|
committer | Jason Gunthorpe <jgg@mellanox.com> | 2018-10-16 00:03:51 -0600 |
commit | a08b9e9a705675ba05fa44f0342e2875fd1bda28 (patch) | |
tree | 32345aad112f2355bf4ace474955ffe8650518bd /drivers/infiniband | |
parent | 854a202001171594df8988b335410adebac641d5 (diff) | |
download | linux-a08b9e9a705675ba05fa44f0342e2875fd1bda28.tar.bz2 |
RDMA/bnxt_re: Wait for delayed work to finish before device removal
Delayed work bnxt_re_worker would be still running even after
cancel_delayed_work returns. This causes crash as the driver proceeds with
device removal. To make sure that the work is finished before returning,
use cancel_delayed_work_sync.
Signed-off-by: Selvin Xavier <selvin.xavier@broadcom.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Diffstat (limited to 'drivers/infiniband')
-rw-r--r-- | drivers/infiniband/hw/bnxt_re/main.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/infiniband/hw/bnxt_re/main.c b/drivers/infiniband/hw/bnxt_re/main.c index 2b1d00d78ad1..75a54c58fdc6 100644 --- a/drivers/infiniband/hw/bnxt_re/main.c +++ b/drivers/infiniband/hw/bnxt_re/main.c @@ -1203,7 +1203,7 @@ static void bnxt_re_ib_unreg(struct bnxt_re_dev *rdev) bnxt_re_unregister_ib(rdev); } if (test_and_clear_bit(BNXT_RE_FLAG_QOS_WORK_REG, &rdev->flags)) - cancel_delayed_work(&rdev->worker); + cancel_delayed_work_sync(&rdev->worker); bnxt_re_cleanup_res(rdev); bnxt_re_free_res(rdev); |