]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit85aab5e0858be46f195dbcf46425d99ec6d516c0
tree51feaa6e0cba4a52daef857128d228176401244a
parent6ea6e4c2b4161a0157249e5e7473a160ea49817a
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