vdpa/mlx5: Avoid using reslock in event_handler
authorEli Cohen <elic@nvidia.com>
Mon, 14 Nov 2022 13:17:55 +0000 (15:17 +0200)
committerMichael S. Tsirkin <mst@redhat.com>
Wed, 28 Dec 2022 10:28:09 +0000 (05:28 -0500)
commit0dbc1b4ae07d003b2e88ba9d4142846320f8e349
treeec9c0524d707b60b49b6c5b5cd31955ceeb26c9a
parent1ab53760d322c82fb4cb5e81b5817065801e3ec4
vdpa/mlx5: Avoid using reslock in event_handler

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>
drivers/vdpa/mlx5/net/mlx5_vnet.c