Re: 答复: [PATCH] iommu/intel: Prevent variable pollution in cache_tag_flush_range()
From: Baolu Lu
Date: Fri Jun 19 2026 - 22:59:34 EST
On 6/17/2026 3:51 PM, Li,Rongqing wrote:
From: Li RongQing<lirongqing@xxxxxxxxx>Ping
The loop in cache_tag_flush_range() modifies local 'addr' and 'mask'
variables that persist across iterations. When CACHE_TAG_NESTING_DEVTLB
overrides them for a full flush and falls through, subsequent tags incorrectly
receive the modified values instead of the original range.
Fix by creating per-iteration local copies initialized from the original parameters,
ensuring each tag processes the intended flush range.
Signed-off-by: Li RongQing<lirongqing@xxxxxxxxx>
Thanks for the patch. It's now in my queue for the next merge window. I
will let you know when I include it in my pull request for Joerg.
Thanks,
baolu