summaryrefslogtreecommitdiff
path: root/block/blk-mq.h
diff options
context:
space:
mode:
authorDavid Rientjes <rientjes@google.com>2020-06-11 12:20:30 -0700
committerChristoph Hellwig <hch@lst.de>2020-06-17 09:29:38 +0200
commit56fccf21d1961a06e2a0c96ce446ebf036651062 (patch)
treec47f6ddb7b3afd5e0ffefafad4af257cb200b486 /block/blk-mq.h
parent96a539fa3bb71f443ae08e57b9f63d6e5bb2207c (diff)
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 'block/blk-mq.h')
0 files changed, 0 insertions, 0 deletions