On 2021-08-24 14:55, Geert Uytterhoeven wrote:
Hi Robin,

On Fri, Aug 20, 2021 at 3:22 PM Robin Murphy <[email protected]> wrote:
Previously io-pgtable merely passed the iommu_iotlb_gather pointer
through to helpers, but now it has grown its own direct dereference.
This turns out to break the build for !IOMMU_API configs where the
structure only has a dummy definition. It will probably also crash
drivers who don't use the gather mechanism and simply pass in NULL.

Wrap this dereference in a suitable helper which can both be stubbed
out for !IOMMU_API and encapsulate a NULL check otherwise.

Fixes: 7a7c5badf858 ("iommu: Indicate queued flushes via gather data")

Is this the right Fixes tag?

Conceptually, yes - that's where the new member was introduced, so that's where its accessor should have been introduced as well, had I not managed to overlook the structure being conditionally defined and assume it didn't need anything special doing. Of course it's not going to make much difference in practice since they are immediately adjacent commits anyway, but it felt right to point at where I made the fundamental mistake rather than where the symptom appeared :)

The build issue was introduced by:
Fixes: a8e5f04458c4e496 ("iommu/io-pgtable: Remove non-strict quirk")

Reported-by: kernel test robot <[email protected]>
Signed-off-by: Robin Murphy <[email protected]>

Thanks, this fixes the build issues I was seeing.

Tested-by: Geert Uytterhoeven <[email protected]>

Thanks for confirming!

Robin.


Gr{oetje,eeting}s,

                         Geert

_______________________________________________
iommu mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/iommu

Reply via email to