svn commit: r314953 - head/sys/compat/linuxkpi/common/src

Hans Petter Selasky hselasky at FreeBSD.org
Thu Mar 9 09:17:45 UTC 2017


Author: hselasky
Date: Thu Mar  9 09:17:43 2017
New Revision: 314953
URL: https://svnweb.freebsd.org/changeset/base/314953

Log:
  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 <imb at protected-networks.net>
  MFC after:		1 week
  Sponsored by:		Mellanox Technologies

Modified:
  head/sys/compat/linuxkpi/common/src/linux_work.c

Modified: head/sys/compat/linuxkpi/common/src/linux_work.c
==============================================================================
--- head/sys/compat/linuxkpi/common/src/linux_work.c	Thu Mar  9 07:55:58 2017	(r314952)
+++ head/sys/compat/linuxkpi/common/src/linux_work.c	Thu Mar  9 09:17:43 2017	(r314953)
@@ -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);


More information about the svn-src-head mailing list