Files
twx-linux/drivers
Robin Murphy ef2646fcfc iommu/qcom: Fix bogus detach logic
commit faf305c51a upstream.

Currently, the implementation of qcom_iommu_domain_free() is guaranteed
to do one of two things: WARN() and leak everything, or dereference NULL
and crash. That alone is terrible, but in fact the whole idea of trying
to track the liveness of a domain via the qcom_domain->iommu pointer as
a sanity check is full of fundamentally flawed assumptions. Make things
robust and actually functional by not trying to be quite so clever.

Reported-by: Brian Masney <masneyb@onstation.org>
Tested-by: Brian Masney <masneyb@onstation.org>
Reported-by: Naresh Kamboju <naresh.kamboju@linaro.org>
Fixes: 0ae349a0f3 ("iommu/qcom: Add qcom_iommu")
Signed-off-by: Robin Murphy <robin.murphy@arm.com>
Tested-by: Stephan Gerhold <stephan@gerhold.net>
Cc: stable@vger.kernel.org # v4.14+
Signed-off-by: Joerg Roedel <jroedel@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-02-28 16:38:43 +01:00
..
…
2020-02-24 08:34:53 +01:00
2020-02-24 08:34:44 +01:00
…
…
…
2020-02-24 08:34:44 +01:00
…
…
…
…
…
…
2020-02-28 16:38:43 +01:00
…
…
…
…
…
…
…
…
2020-02-14 16:33:24 -05:00
…
…
…
…
…
…
…
…
…
…
2020-02-24 08:34:47 +01:00
…
…
…