Date: Sat, 18 Apr 2015 17:21:13 +0000 (UTC) From: Konstantin Belousov <kib@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281696 - head/sys/kern Message-ID: <201504181721.t3IHLDS4072990@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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: luke.tw@gmail.com 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); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201504181721.t3IHLDS4072990>