Reinstate some of "swiotlb: rework "fix info leak with DMA_FROM_DEVICE""
commit 901c7280ca0d5e2b4a8929fbe0bfb007ac2a6544 upstream.
Halil Pasic points out  that the full revert of that commit (revert
in bddac7c1e02b), and that a partial revert that only reverts the
problematic case, but still keeps some of the cleanups is probably
And that partial revert  had already been verified by Oleksandr
Natalenko to also fix the issue, I had just missed that in the long
So let's reinstate the cleanups from commit aa6f8dcbab47 ("swiotlb:
rework "fix info leak with DMA_FROM_DEVICE""), and effectively only
revert the part that caused problems.
Link: https://firstname.lastname@example.org/ 
Link: https://lore.kernel.org/all/20220324055732.GB12078@lst.de/ 
Link: https://lore.kernel.org/all/4386660.LvFx2qVVIh@natalenko.name/ 
Suggested-by: Halil Pasic <email@example.com>
Tested-by: Oleksandr Natalenko <firstname.lastname@example.org>
Cc: Christoph Hellwig" <email@example.com>
Signed-off-by: Linus Torvalds <firstname.lastname@example.org>
[OP: backport to 5.4: adjusted context]
Signed-off-by: Ovidiu Panait <email@example.com>
Signed-off-by: Greg Kroah-Hartman <firstname.lastname@example.org>
3 files changed