drivers/crypto/ccp/ccp-dev-v5.c | 4 ++++ 1 file changed, 4 insertions(+)
On PCI devices using MSI-X, ccp5_irq_handler() schedules irq_tasklet.
The teardown paths release the IRQ but do not drain a tasklet that was
already queued, so it can access ccp after the device-managed allocation
has been released.
Kill the tasklet after releasing the IRQ in both the initialization
error path and ccp5_destroy().
Fixes: 6263b51eb319 ("crypto: ccp - Change ISR handler method for a v5 CCP")
Signed-off-by: Jiale Yao <yaojiale02@163.com>
---
drivers/crypto/ccp/ccp-dev-v5.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/crypto/ccp/ccp-dev-v5.c b/drivers/crypto/ccp/ccp-dev-v5.c
index 7b73332d6aa1..4235be5df546 100644
--- a/drivers/crypto/ccp/ccp-dev-v5.c
+++ b/drivers/crypto/ccp/ccp-dev-v5.c
@@ -995,6 +995,8 @@ static int ccp5_init(struct ccp_device *ccp)
e_irq:
sp_free_ccp_irq(ccp->sp, ccp);
+ if (ccp->use_tasklet)
+ tasklet_kill(&ccp->irq_tasklet);
e_pool:
for (i = 0; i < ccp->cmd_q_count; i++)
@@ -1046,6 +1048,8 @@ static void ccp5_destroy(struct ccp_device *ccp)
kthread_stop(ccp->cmd_q[i].kthread);
sp_free_ccp_irq(ccp->sp, ccp);
+ if (ccp->use_tasklet)
+ tasklet_kill(&ccp->irq_tasklet);
/* Flush the cmd and backlog queue */
while (!list_empty(&ccp->cmd)) {
--
2.34.1
On Mon, Sep 21, 2026 at 01:34:17AM +0800, Jiale Yao wrote:
> On PCI devices using MSI-X, ccp5_irq_handler() schedules irq_tasklet.
> The teardown paths release the IRQ but do not drain a tasklet that was
> already queued, so it can access ccp after the device-managed allocation
> has been released.
>
> Kill the tasklet after releasing the IRQ in both the initialization
> error path and ccp5_destroy().
>
> Fixes: 6263b51eb319 ("crypto: ccp - Change ISR handler method for a v5 CCP")
>
> Signed-off-by: Jiale Yao <yaojiale02@163.com>
> ---
> drivers/crypto/ccp/ccp-dev-v5.c | 4 ++++
> 1 file changed, 4 insertions(+)
Patch applied. Thanks.
--
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
© 2016 - 2026 Red Hat, Inc.