From a7ca2c6ad045ae12db1a75303e7497babc28a8ef Mon Sep 17 00:00:00 2001 From: Konstantin Belousov Date: Sat, 3 Jun 2017 14:12:17 +0000 Subject: [PATCH] Ensure that cached struct thread does not keep spurious td_su reference on an UFS mount point. Reported and tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week --- sys/kern/kern_proc.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/kern/kern_proc.c b/sys/kern/kern_proc.c index c029567b6c4..10fdee4ee1e 100644 --- a/sys/kern/kern_proc.c +++ b/sys/kern/kern_proc.c @@ -226,6 +226,8 @@ proc_dtor(void *mem, int size, void *arg) #endif /* Free all OSD associated to this thread. */ osd_thread_exit(td); + td_softdep_cleanup(td); + MPASS(td->td_su == NULL); /* Make sure all thread destructors are executed */ EVENTHANDLER_INVOKE(thread_dtor, td);