dma-direct: always leak memory that can't be re-encrypted
authorChristoph Hellwig <hch@lst.de>
Tue, 9 Nov 2021 14:41:01 +0000 (15:41 +0100)
committerChristoph Hellwig <hch@lst.de>
Tue, 7 Dec 2021 11:47:38 +0000 (12:47 +0100)
commita90cf30437489343b8386ae87b4827b6d6c3ed50
tree65dd1ad2ed4fac84b87a36df276ebf385ce48232
parent5570449b6876f215d49ac4db9ccce6ff7aa1e20a
dma-direct: always leak memory that can't be re-encrypted

We must never let unencrypted memory go back into the general page pool.
So if we fail to set it back to encrypted when freeing DMA memory, leak
the memory instead and warn the user.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Robin Murphy <robin.murphy@arm.com>
kernel/dma/direct.c