diff options
| author | David Rientjes <rientjes@google.com> | 2020-06-11 12:20:30 -0700 |
|---|---|---|
| committer | Christoph Hellwig <hch@lst.de> | 2020-06-17 09:29:38 +0200 |
| commit | 56fccf21d1961a06e2a0c96ce446ebf036651062 (patch) | |
| tree | c47f6ddb7b3afd5e0ffefafad4af257cb200b486 /tools/perf/scripts/python/exported-sql-viewer.py | |
| parent | dma-direct: re-encrypt memory if dma_direct_alloc_pages() fails (diff) | |
| download | linux-56fccf21d1961a06e2a0c96ce446ebf036651062.tar.gz linux-56fccf21d1961a06e2a0c96ce446ebf036651062.zip | |
dma-direct: check return value when encrypting or decrypting memory
__change_page_attr() can fail which will cause set_memory_encrypted() and
set_memory_decrypted() to return non-zero.
If the device requires unencrypted DMA memory and decryption fails, simply
free the memory and fail.
If attempting to re-encrypt in the failure path and that encryption fails,
there is no alternative other than to leak the memory.
Fixes: c10f07aa27da ("dma/direct: Handle force decryption for DMA coherent buffers in common code")
Signed-off-by: David Rientjes <rientjes@google.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'tools/perf/scripts/python/exported-sql-viewer.py')
0 files changed, 0 insertions, 0 deletions
