Skip to contentSkip to conversation

Modules fixes for v6.16-rc6

GIT PULL Merged Daniel Gomez 3 participants 5 messages Jul 8, 2025 – Jul 9, 2025

lore
Share & tools
lore
#0 lore raw

The following changes since commit d7b8f8e20813f0179d8ef519541a3527e7661d3a:

Linux 6.16-rc5 (2025-07-06 14:10:26 -0700)

are available in the Git repository at:

git://git.kernel.org/pub/scm/linux/kernel/git/modules/linux.git tags/modules-6.16-rc6.fixes

for you to fetch changes up to af1ccf546e5f2915fbbde26841db43a971d81cf3:

MAINTAINERS: update Daniel Gomez's role and email address (2025-07-08 20:52:30 +0200)

----------------------------------------------------------------
Modules fixes for 6.16-rc6

This includes 2 fixes: one introduced in the current release cycle (v6.16-rc1) and another introduced back in v6.4-rc1. Both have been in linux-next since next-250701 and have passed the modules ci tests using kdevops. Finally, as Petr and Luis mentioned in previous pull requests, add myself (Daniel Gomez) to the list of modules maintainers.

The first was reported by Intel's kernel test robot, and it addresses a crash exposed by Sebastian's commit c50d295c37f2 ("rds: Use nested-BH locking for rds_page_remainder") by allowing relocations for the per-CPU section even if it lacks the SHF_ALLOC flag. Petr and Sebastian went down to the archive history (before Git) and found the commit that broke it b3b91325f3c7 ("Don't relocate non-allocated regions in modules.").

The second fix, reported and fixed by Petr (with additional cleanup), resolves a memory leak by ensuring proper deallocation if module loading fails. We couldn't find a reproducer other than forcing it manually or leveraging eBPF. So, I tested it by enabling error injection in the codetag functions through the error path that produces the leak and made it fail until execmem is unable to allocate more memory.

-----BEGIN PGP SIGNATURE-----

iQIzBAABCAAdFiEE73Ua4R8Pc+G5xjxTQJ6jxB8ZUfsFAmhta7AACgkQQJ6jxB8Z UftulhAAiK78CFOdIcKbGKMD8tBGCHUT6IVCskY0E3aqDmhZiNEXhpmwKnOq56zo ztbwg81Acc41t0Y283vgmZuEpJbzmS47qRYIZEhk5BuLdKl3Hn91Iyi3sdZLB9gD VaYkpY0y4V3pWL5AM/9rtnLvY7PSLZG0bnAeS2fsOzxN5DIn2IIdD3WsU++96O+k LHIik7dXcBQQKOukRClAI+cZiU2IGGG/FcDuMmANcsw+E4GKTBQunZiixTZOjdgi e//NMYw1+Y5DJQ/i7C3Fl6+W+r/8/HPkRxyZ3Wt79WBZxwV/Hp5iTG9652vHKE1i ybBDwlJkQC/EQsup4NKzDby38bPW1tdYwwK0dNbMRGxNICqNe7rq5fEG4WjTjXAA H2O5VZ84Ys1SRx+uXeu83aog6fdiZ9DezGuaxFgrTRHUken2QvxJ/HTXe1BmMNY5 9BbHPrG22dp+dEDptSVaDWWMQZ6OP73gXrPYowQC8/FOm9NdBXVIH9hvvI7KRSf5 OC4A7nyZCDNW/Dwzc6yi3qAWMkKCR6IGMqN9vFiR3iIkaHJN1KABFzaVmh3JpR+B 6TsuO8/EIu9Ue25VgMehSj9LuGFgbhcfg40N2Fj/7+vgAM4Rd5sOw/NyiaD8xUPC j0Ql4ehZiOQof8wAhdxpHFQQjO30UdpQgOmUO1yNUdmuPIpdSN0= =dQvQ
-----END PGP SIGNATURE-----

----------------------------------------------------------------
Daniel Gomez (1):
MAINTAINERS: update Daniel Gomez's role and email address

Petr Pavlu (2):
module: Fix memory deallocation on error path in move_module()
module: Avoid unnecessary return value initialization in move_module()

Sebastian Andrzej Siewior (1):
module: Make sure relocations are applied to the per-CPU section

 MAINTAINERS          |  2 +-
 kernel/module/main.c | 17 +++++++++++------
 2 files changed, 12 insertions(+), 7 deletions(-)
#1 lore raw
Quoted 4 lines · Daniel Gomez

Petr and Sebastian went down to the archive history (before Git) and found the commit that broke it b3b91325f3c7 ("Don't relocate non-allocated regions in modules.").

When mentioning git commits in other trees, you really do need to mention *which* other tree it is.

In this case, it seems to be

https://git.kernel.org/pub/scm/linux/kernel/git/mpe/linux-fullhistory.git/

that has that commit, but that's actually a kind of odd tree.

The typical bitkeeper conversion tree (which is where I suspect the full-history conversion then got it from, unless somebody did a separate conversion) that contains that commit is actually

https://git.kernel.org/pub/scm/linux/kernel/git/tglx/history.git/

and there the commit has commit ID 1a6100caae ("Don't relocate non-allocated regions in modules")

Linus

merge bot Merged
#2 lore raw
The pull request you sent on Tue, 8 Jul 2025 13:21:09 -0700:

The pull request you sent on Tue, 8 Jul 2025 13:21:09 -0700:

Quoted 1 line

https://git.kernel.org/pub/scm/linux/kernel/git/mpe/linux-fullhistory.git/ refs/heads/master

has been merged into torvalds/linux.git:
https://git.kernel.org/torvalds/c/046cc01be6b9d139b49dfc396b7201c633ff1a26

Thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/prtracker.html
#3 lore raw
In reply to Linus Torvalds
Quoted 8 lines · Linus Torvalds
Quoted 4 lines · Daniel Gomez

Petr and Sebastian went down to the archive history (before Git) and found the commit that broke it b3b91325f3c7 ("Don't relocate non-allocated regions in modules.").

When mentioning git commits in other trees, you really do need to mention *which* other tree it is.

Makes sense. I thought there was only one history tree to search for this.

Quoted 5 lines

In this case, it seems to be

https://git.kernel.org/pub/scm/linux/kernel/git/mpe/linux-fullhistory.git/

Quoted 7 lines

that has that commit, but that's actually a kind of odd tree.

The typical bitkeeper conversion tree (which is where I suspect the full-history conversion then got it from, unless somebody did a separate conversion) that contains that commit is actually

https://git.kernel.org/pub/scm/linux/kernel/git/tglx/history.git/

Thanks for the link.

Quoted 3 lines

and there the commit has commit ID 1a6100caae ("Don't relocate non-allocated regions in modules")

That's it.

Quoted 2 lines

Linus

merge bot Merged
#4 lore raw
In reply to Daniel Gomez
The pull request you sent on Tue, 8 Jul 2025 21:38:20 +0200:

The pull request you sent on Tue, 8 Jul 2025 21:38:20 +0200:

Quoted 1 line

git://git.kernel.org/pub/scm/linux/kernel/git/modules/linux.git tags/modules-6.16-rc6.fixes

has been merged into torvalds/linux.git:
https://git.kernel.org/torvalds/c/72782127388d96e971f0186996a5bd44e64a1665

Thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/prtracker.html