diff options
author | wangyangxin <wangyangxin1@huawei.com> | 2023-12-11 19:42:15 +0800 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2023-12-22 12:30:19 +0800 |
commit | 67cc511e8d436456cc98033e6d4ba83ebfc8e672 (patch) | |
tree | e615adb91251572e561c02b810eabe6d6cc96a15 /drivers | |
parent | c480a421a4faf693c38e60b0fe6e554c9a3fee02 (diff) | |
download | linux-stable-67cc511e8d436456cc98033e6d4ba83ebfc8e672.tar.gz linux-stable-67cc511e8d436456cc98033e6d4ba83ebfc8e672.tar.bz2 linux-stable-67cc511e8d436456cc98033e6d4ba83ebfc8e672.zip |
crypto: virtio - Wait for tasklet to complete on device remove
The scheduled tasklet needs to be executed on device remove.
Fixes: fed93fb62e05 ("crypto: virtio - Handle dataq logic with tasklet")
Signed-off-by: wangyangxin <wangyangxin1@huawei.com>
Signed-off-by: Gonglei <arei.gonglei@huawei.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/crypto/virtio/virtio_crypto_core.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/crypto/virtio/virtio_crypto_core.c b/drivers/crypto/virtio/virtio_crypto_core.c index 428d76562447..b909c6a2bf1c 100644 --- a/drivers/crypto/virtio/virtio_crypto_core.c +++ b/drivers/crypto/virtio/virtio_crypto_core.c @@ -500,12 +500,15 @@ static void virtcrypto_free_unused_reqs(struct virtio_crypto *vcrypto) static void virtcrypto_remove(struct virtio_device *vdev) { struct virtio_crypto *vcrypto = vdev->priv; + int i; dev_info(&vdev->dev, "Start virtcrypto_remove.\n"); flush_work(&vcrypto->config_work); if (virtcrypto_dev_started(vcrypto)) virtcrypto_dev_stop(vcrypto); + for (i = 0; i < vcrypto->max_data_queues; i++) + tasklet_kill(&vcrypto->data_vq[i].done_task); virtio_reset_device(vdev); virtcrypto_free_unused_reqs(vcrypto); virtcrypto_clear_crypto_engines(vcrypto); |