From 7fd3238e5991fcc53a22b7e3c6848df5ffb613f0 Mon Sep 17 00:00:00 2001 From: hselasky Date: Thu, 9 Mar 2017 09:17:43 +0000 Subject: [PATCH] Don't create any threads before SI_SUB_INIT_IF in the LinuxKPI. Else kthread_add() will assert it is called too soon. This fixes a startup issue when COMPAT_LINUXKPI is in enabled the kernel configuration file. Reported by: Michael Butler MFC after: 1 week Sponsored by: Mellanox Technologies --- sys/compat/linuxkpi/common/src/linux_work.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/compat/linuxkpi/common/src/linux_work.c b/sys/compat/linuxkpi/common/src/linux_work.c index d4464ed8a2ab..3a68c95eff42 100644 --- a/sys/compat/linuxkpi/common/src/linux_work.c +++ b/sys/compat/linuxkpi/common/src/linux_work.c @@ -546,7 +546,7 @@ linux_work_init(void *arg) system_power_efficient_wq = linux_system_short_wq; system_unbound_wq = linux_system_short_wq; } -SYSINIT(linux_work_init, SI_SUB_LOCK, SI_ORDER_SECOND, linux_work_init, NULL); +SYSINIT(linux_work_init, SI_SUB_INIT_IF, SI_ORDER_THIRD, linux_work_init, NULL); static void linux_work_uninit(void *arg) @@ -560,4 +560,4 @@ linux_work_uninit(void *arg) system_power_efficient_wq = NULL; system_unbound_wq = NULL; } -SYSUNINIT(linux_work_uninit, SI_SUB_LOCK, SI_ORDER_SECOND, linux_work_uninit, NULL); +SYSUNINIT(linux_work_uninit, SI_SUB_INIT_IF, SI_ORDER_THIRD, linux_work_uninit, NULL);