[v9 1/6] vhost: fix thread safety checks for vhost crypto data req
Maxime Coquelin
maxime.coquelin at redhat.com
Mon Mar 3 10:07:32 CET 2025
On 2/28/25 2:47 PM, Gowrishankar Muthukrishnan wrote:
> For thread safety check to succeed (as in clang), calling function
> should ensure vq->iotlb_lock locked before passing vq to a function
> that has thread safety attribute, in vhost crypto implementation.
>
> When vhost_crypto_data_req is local and its vq is pointer to a
> locked vq, clang does not recognise this inherited lock and
> stops compilation. This patch explicitly uses vhost_virtqueue
> where ever required and fulfills thread safety checks.
>
> Signed-off-by: Gowrishankar Muthukrishnan <gmuthukrishn at marvell.com>
> ---
> lib/vhost/vhost_crypto.c | 76 ++++++++++++++++++++++------------------
> 1 file changed, 41 insertions(+), 35 deletions(-)
>
Reviewed-by: Maxime Coquelin <maxime.coquelin at redhat.com>
Thanks for doing these changes,
Maxime
More information about the dev
mailing list