[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20191113092950.15556-1-khorenko@virtuozzo.com>
Date: Wed, 13 Nov 2019 12:29:49 +0300
From: Konstantin Khorenko <khorenko@...tuozzo.com>
To: Jessica Yu <jeyu@...nel.org>, Prarit Bhargava <prarit@...hat.com>,
Barret Rhoden <brho@...gle.com>
Cc: Konstantin Khorenko <khorenko@...tuozzo.com>,
Andrey Ryabinin <aryabinin@...tuozzo.com>,
linux-kernel@...r.kernel.org, David Arcari <darcari@...hat.com>,
Heiko Carstens <heiko.carstens@...ibm.com>
Subject: [PATCH 0/1] kernel/module.c: don't allow modprobe to hang forever on a module load
After commit 6e6de3dee51a ("kernel/module.c: Only return -EEXIST
for modules that have finished loading")
the simple test leads to hanged modprobe process (INTERRUPTIBLE):
1. Make sure nft_ct module is not used by your firewall rules.
2. Run 3 copies of
# export i=0; while true; if [[ $(($i % 100)) -eq 0 ]] ; then \
echo "i=$i"; fi; do modprobe nft_ct; i=$(($i + 1)); done
3. Run 2 copies of
# while true; do rmmod nft_ct; done
Hanged "modprobe" process will appear in ~ 10 seconds.
# cat /proc/30184/stack
[<0>] load_module+0x53f/0x2060
[<0>] __do_sys_finit_module+0xd2/0x100
[<0>] do_syscall_64+0x5b/0x1c0
[<0>] entry_SYSCALL_64_after_hwframe+0x44/0xa9
Konstantin Khorenko (1):
kernel/module.c: wakeup processes in module_wq on module unload
kernel/module.c | 2 ++
1 file changed, 2 insertions(+)
--
2.15.1
Powered by blists - more mailing lists