RDMA/bnxt_re: Wait for delayed work to finish before device removal
authorSelvin Xavier <selvin.xavier@broadcom.com>
Mon, 8 Oct 2018 10:28:03 +0000 (03:28 -0700)
committerJason Gunthorpe <jgg@mellanox.com>
Tue, 16 Oct 2018 06:03:51 +0000 (00:03 -0600)
commita08b9e9a705675ba05fa44f0342e2875fd1bda28
tree32345aad112f2355bf4ace474955ffe8650518bd
parent854a202001171594df8988b335410adebac641d5
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>
drivers/infiniband/hw/bnxt_re/main.c