diff options
author | Corentin Labbe <clabbe@baylibre.com> | 2021-05-05 23:26:08 +0300 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2021-05-14 14:07:56 +0300 |
commit | 9395c58fdddd79cdd3882132cdd04e8ac7ad525f (patch) | |
tree | 0e79527bd8660b10fcd66d2657690dfadb83d5ce /drivers/crypto/ixp4xx_crypto.c | |
parent | 0cdbabf8bb7a6147f5adf37dbc251e92a1bbc2c7 (diff) | |
download | linux-9395c58fdddd79cdd3882132cdd04e8ac7ad525f.tar.xz |
crypto: ixp4xx - dma_unmap the correct address
Testing ixp4xx_crypto with CONFIG_DMA_API_DEBUG lead to the following error:
DMA-API: platform ixp4xx_crypto.0: device driver tries to free DMA memory it has not allocated [device address=0x0000000000000000] [size=24 bytes]
This is due to dma_unmap using the wrong address.
Fixes: 0d44dc59b2b4 ("crypto: ixp4xx - Fix handling of chained sg buffers")
Signed-off-by: Corentin Labbe <clabbe@baylibre.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/crypto/ixp4xx_crypto.c')
-rw-r--r-- | drivers/crypto/ixp4xx_crypto.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/crypto/ixp4xx_crypto.c b/drivers/crypto/ixp4xx_crypto.c index 0616e369522e..ed3deaa5ed2b 100644 --- a/drivers/crypto/ixp4xx_crypto.c +++ b/drivers/crypto/ixp4xx_crypto.c @@ -330,7 +330,7 @@ static void free_buf_chain(struct device *dev, struct buffer_desc *buf, buf1 = buf->next; phys1 = buf->phys_next; - dma_unmap_single(dev, buf->phys_next, buf->buf_len, buf->dir); + dma_unmap_single(dev, buf->phys_addr, buf->buf_len, buf->dir); dma_pool_free(buffer_pool, buf, phys); buf = buf1; phys = phys1; |