]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
module: make waiting for a concurrent module loader interruptible
authorLinus Torvalds <torvalds@linux-foundation.org>
Fri, 9 Aug 2024 15:33:28 +0000 (08:33 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 14 Aug 2024 13:34:25 +0000 (15:34 +0200)
commit87d601cdc6c53a71ed0398ff02e05f9e110bd2cf
tree7974e61e88c5689b5dff1297de51ec142c196d15
parent89f51d7c2cf75b9cdeb23d961ac212bdfdb9767a
module: make waiting for a concurrent module loader interruptible

[ Upstream commit 2124d84db293ba164059077944e6b429ba530495 ]

The recursive aes-arm-bs module load situation reported by Russell King
is getting fixed in the crypto layer, but this in the meantime fixes the
"recursive load hangs forever" by just making the waiting for the first
module load be interruptible.

This should now match the old behavior before commit 9b9879fc0327
("modules: catch concurrent module loads, treat them as idempotent"),
which used the different "wait for module to be ready" code in
module_patient_check_exists().

End result: a recursive module load will still block, but now a signal
will interrupt it and fail the second module load, at which point the
first module will successfully complete loading.

Fixes: 9b9879fc0327 ("modules: catch concurrent module loads, treat them as idempotent")
Cc: Russell King <linux@armlinux.org.uk>
Cc: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
kernel/module/main.c