IB/mlx4: Fix race condition between catas error reset and aliasguid flows
authorJack Morgenstein <jackm@dev.mellanox.co.il>
Wed, 6 Mar 2019 17:17:56 +0000 (19:17 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 20 Apr 2019 07:07:47 +0000 (09:07 +0200)
commit6edfeb304bf18c9b69e451996598a26a5681ddb0
treea43b50f3192bb6cac10fbce0a6f3028eb5d168bf
parent5e6e33fd757714e76d7abeddac125547bb2cf20d
IB/mlx4: Fix race condition between catas error reset and aliasguid flows

[ Upstream commit 587443e7773e150ae29e643ee8f41a1eed226565 ]

Code review revealed a race condition which could allow the catas error
flow to interrupt the alias guid query post mechanism at random points.
Thiis is fixed by doing cancel_delayed_work_sync() instead of
cancel_delayed_work() during the alias guid mechanism destroy flow.

Fixes: a0c64a17aba8 ("mlx4: Add alias_guid mechanism")
Signed-off-by: Jack Morgenstein <jackm@dev.mellanox.co.il>
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/infiniband/hw/mlx4/alias_GUID.c