Author: kib
Date: Sat Apr 18 17:21:12 2015
New Revision: 281696
URL: https://svnweb.freebsd.org/changeset/base/281696

Log:
  Initialize td_sel in the thread_init().  Struct thread is not zeroed
  on the initial allocation, but seltdinit() assumes that td_sel is NULL
  or a valid pointer.  Note that thread_fini()/seltdfini() also relies
  on this, but correctly resets td_sel to NULL.
  
  Submitted by: [email protected]
  PR:   199518
  MFC after:    1 week

Modified:
  head/sys/kern/kern_thread.c

Modified: head/sys/kern/kern_thread.c
==============================================================================
--- head/sys/kern/kern_thread.c Sat Apr 18 16:58:33 2015        (r281695)
+++ head/sys/kern/kern_thread.c Sat Apr 18 17:21:12 2015        (r281696)
@@ -209,6 +209,7 @@ thread_init(void *mem, int size, int fla
        td->td_sched = (struct td_sched *)&td[1];
        umtx_thread_init(td);
        td->td_kstack = 0;
+       td->td_sel = NULL;
        return (0);
 }
 
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "[email protected]"

Reply via email to