From bd610e47e2a0cad4c7e2878e1e5efeaf2ef83d32 Mon Sep 17 00:00:00 2001 From: Bill Paul Date: Mon, 7 Jun 2004 01:22:48 +0000 Subject: [PATCH] Add another 5.2.1 source compatibility tweak: acquire Giant before calling kthread_exit() if FreeBSD_version is old enough. --- sys/compat/ndis/kern_ndis.c | 3 +++ sys/compat/ndis/subr_ntoskrnl.c | 3 +++ 2 files changed, 6 insertions(+) diff --git a/sys/compat/ndis/kern_ndis.c b/sys/compat/ndis/kern_ndis.c index e8a89e7c1255..bbfff77651b2 100644 --- a/sys/compat/ndis/kern_ndis.c +++ b/sys/compat/ndis/kern_ndis.c @@ -244,6 +244,9 @@ ndis_runq(arg) } wakeup(die); +#if __FreeBSD_version < 502113 + mtx_lock(&Giant); +#endif kthread_exit(0); return; /* notreached */ } diff --git a/sys/compat/ndis/subr_ntoskrnl.c b/sys/compat/ndis/subr_ntoskrnl.c index fb6c06d19071..02c6f52ff8b7 100644 --- a/sys/compat/ndis/subr_ntoskrnl.c +++ b/sys/compat/ndis/subr_ntoskrnl.c @@ -1609,6 +1609,9 @@ ntoskrnl_thread_exit(status) ntoskrnl_kth--; +#if __FreeBSD_version < 502113 + mtx_lock(&Giant); +#endif kthread_exit(0); return(0); /* notreached */ }