On Fri, Oct 25, 2024 at 11:47:24AM +0200, Christian Marangi wrote: > +static void eip93_hash_free_data_blocks(struct ahash_request *req) > +{ > + struct eip93_hash_reqctx *rctx = ahash_request_ctx(req); > + struct mkt_hash_block *block; > + > + list_for_each_entry(block, &rctx->blocks, list) { > + dma_unmap_single(rctx->mtk->dev, block->data_dma, > + SHA256_BLOCK_SIZE, DMA_TO_DEVICE); > + kfree(block); You need to use list_for_each_entry_safe() to avoid a use after free. > + } > +} regards, dan carpenter