Date: Wed, 17 Aug 2016 07:13:26 +0000 (UTC) From: Konstantin Belousov <kib@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r304264 - stable/10/sys/kern Message-ID: <201608170713.u7H7DQ7q003678@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: kib Date: Wed Aug 17 07:13:25 2016 New Revision: 304264 URL: https://svnweb.freebsd.org/changeset/base/304264 Log: MFC r303914: Re-schedule signals after kthread exits. Modified: stable/10/sys/kern/kern_kthread.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/kern/kern_kthread.c ============================================================================== --- stable/10/sys/kern/kern_kthread.c Wed Aug 17 07:11:45 2016 (r304263) +++ stable/10/sys/kern/kern_kthread.c Wed Aug 17 07:13:25 2016 (r304264) @@ -322,11 +322,13 @@ void kthread_exit(void) { struct proc *p; + struct thread *td; - p = curthread->td_proc; + td = curthread; + p = td->td_proc; /* A module may be waiting for us to exit. */ - wakeup(curthread); + wakeup(td); /* * The last exiting thread in a kernel process must tear down @@ -339,9 +341,10 @@ kthread_exit(void) rw_wunlock(&tidhash_lock); kproc_exit(0); } - LIST_REMOVE(curthread, td_hash); + LIST_REMOVE(td, td_hash); rw_wunlock(&tidhash_lock); - umtx_thread_exit(curthread); + umtx_thread_exit(td); + tdsigcleanup(td); PROC_SLOCK(p); thread_exit(); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201608170713.u7H7DQ7q003678>