dma-direct: use the correct size for dma_set_encrypted()
authorDexuan Cui <decui@microsoft.com>
Wed, 22 Jun 2022 19:14:24 +0000 (12:14 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 29 Jun 2022 07:03:31 +0000 (09:03 +0200)
commitcced9ce619ef483616b9e5ef4da6287ba2292a29
tree8c7c1bd97a12a29a7b25d048650371f3272bae2f
parenta8bbb4c26460cf5b6cda080c58c49faf10e9bcda
dma-direct: use the correct size for dma_set_encrypted()

commit 3be4562584bba603f33863a00c1c32eecf772ee6 upstream.

The third parameter of dma_set_encrypted() is a size in bytes rather than
the number of pages.

Fixes: 4d0564785bb0 ("dma-direct: factor out dma_set_{de,en}crypted helpers")
Signed-off-by: Dexuan Cui <decui@microsoft.com>
Reviewed-by: Robin Murphy <robin.murphy@arm.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
kernel/dma/direct.c