Re: [PATCH v1 1/1] iommu/dma: Make SG mapping and syncing robust against empty tables
From: Christoph Hellwig
Date: Tue May 28 2024 - 00:49:18 EST
On Tue, May 28, 2024 at 02:26:25AM +0300, Andy Shevchenko wrote:
> Statistically there are only a few cases in the kernel that do such a
> check. However, any attempt to make it alinged with the rest 99%+ cases
> will be a regression due to above mentioned relatively recent change.
> Instead of asking a caller to perform the checks, just return status quo
> to SG mapping and syncing callbacks, so they won't crash on
> uninitialised SG list.
This is not a valid use of the API, please fix the callers instead.