vdpa/mlx5: Avoid using reslock in event_handler
authorEli Cohen <elic@nvidia.com>
Mon, 14 Nov 2022 13:17:55 +0000 (15:17 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 24 Jan 2023 06:24:31 +0000 (07:24 +0100)
commit909b96557b38ea4bf99f5ab7dc8d6d339a96ab60
tree51feaa6e0cba4a52daef857128d228176401244a
parent6dbffca77f120cb70e0d5326571a81038282b309
vdpa/mlx5: Avoid using reslock in event_handler

[ Upstream commit 0dbc1b4ae07d003b2e88ba9d4142846320f8e349 ]

event_handler runs under atomic context and may not acquire reslock. We
can still guarantee that the handler won't be called after suspend by
clearing nb_registered, unregistering the handler and flushing the
workqueue.

Signed-off-by: Eli Cohen <elic@nvidia.com>
Message-Id: <20221114131759.57883-5-elic@nvidia.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/vdpa/mlx5/net/mlx5_vnet.c