]> git.baikalelectronics.ru Git - kernel.git/commit
swiotlb: fail map correctly with failed io_tlb_default_mem
authorRobin Murphy <robin.murphy@arm.com>
Tue, 12 Jul 2022 06:46:45 +0000 (08:46 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 17 Aug 2022 12:24:07 +0000 (14:24 +0200)
commit136071cd58e06a541724661765cbf72c62c9d8a1
tree1dda14f15ec648d2063873770e940947b6bdb037
parentf7ee54f050dcdc56622a9c9746f65d7e0af15938
swiotlb: fail map correctly with failed io_tlb_default_mem

[ Upstream commit 3acd4cc7d58ea9ab80c744ffca5f6d53fb01fc48 ]

In the failure case of trying to use a buffer which we'd previously
failed to allocate, the "!mem" condition is no longer sufficient since
io_tlb_default_mem became static and assigned by default. Update the
condition to work as intended per the rest of that conversion.

Fixes: b0688e84e0ce ("swiotlb: Convert io_default_tlb_mem to static allocation")
Signed-off-by: Robin Murphy <robin.murphy@arm.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
kernel/dma/swiotlb.c