On Fri, Jul 25, 2025 at 06:32:50PM +0800, Arin Sun wrote:
Dear Stable Kernel Team and Maintainers,
I am writing to request a backport of the following commit from the mainline kernel to the 5.15.y stable branch:
Commit: x86/ioremap: Use is_ioremap_addr() in iounmap() ID: 50c6dbdfd16e312382842198a7919341ad480e05 Author: Max Ramanouski Merged in: Linux 6.11-rc1 (approximately August 2024)
It showed up in 6.12, not 6.11.
This commit fixes a bug in the iounmap() function for x86 architectures in kernel versions 5.x. Specifically, the original code uses a check against high_memory:
if ((void __force *)addr <= high_memory) return;
This can lead to memory leaks on certain x86 servers where ioremap() returns addresses that are not guaranteed to be greater than high_memory, causing the function to return early without properly unmapping the memory.
The fix replaces this with is_ioremap_addr(), making the check more reliable:
if (WARN_ON_ONCE(!is_ioremap_addr((void __force *)addr))) return;
I have checked the 5.15.y branch logs and did not find this backport. This issue affects production environments, particularly on customer machines where we cannot easily deploy custom kernels. Backporting this to 5.15.y (and possibly other LTS branches like 5.10.y if applicable) would help resolve the memory leak without requiring users to upgrade to 6.x series.
Do you have plans to backport this commit? If not, could you please consider it for inclusion in the stable releases?
Note, this caused problems that later commits were required to fix up.
Can you please provide a set of properly backported commits, that are tested, to all of the relevant kernel trees that you need/want this for? You can't just apply a patch to an older kernel tree and not a newer one as that would cause a regression when upgrading, right?
But I might ask, why not just move to the 6.12.y release? What is forcing you to keep on 5.15.y and what are you plans for moving off of that in a few years?
thanks,
greg k-h