[GIT PULL] Modules fixes for v6.16-rc6
From: Daniel Gomez
Date: Tue Jul 08 2025 - 15:39:39 EST
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.
Signed-off-by: Daniel Gomez <da.gomez@xxxxxxxxxxx>
-----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(-)