svn commit: r192493 - stable/7/sys/kern

Kip Macy kmacy at FreeBSD.org
Wed May 20 22:30:59 UTC 2009


Author: kmacy
Date: Wed May 20 22:30:57 2009
New Revision: 192493
URL: http://svn.freebsd.org/changeset/base/192493

Log:
  td_osd is at the end of struct thread to avoid breaking the ABI
  as a side effect it is outside of the td_startzero-td_endzero range,
  requiring it to be separately zeroed

Modified:
  stable/7/sys/kern/kern_fork.c
  stable/7/sys/kern/kern_kse.c
  stable/7/sys/kern/kern_thr.c

Modified: stable/7/sys/kern/kern_fork.c
==============================================================================
--- stable/7/sys/kern/kern_fork.c	Wed May 20 22:28:55 2009	(r192492)
+++ stable/7/sys/kern/kern_fork.c	Wed May 20 22:30:57 2009	(r192493)
@@ -507,6 +507,7 @@ again:
 
 	bcopy(&td->td_startcopy, &td2->td_startcopy,
 	    __rangeof(struct thread, td_startcopy, td_endcopy));
+	bzero(&td2->td_osd, sizeof(struct osd));
 
 	td2->td_sigstk = td->td_sigstk;
 	td2->td_sigmask = td->td_sigmask;

Modified: stable/7/sys/kern/kern_kse.c
==============================================================================
--- stable/7/sys/kern/kern_kse.c	Wed May 20 22:28:55 2009	(r192492)
+++ stable/7/sys/kern/kern_kse.c	Wed May 20 22:30:57 2009	(r192493)
@@ -1014,6 +1014,7 @@ thread_alloc_spare(struct thread *td)
 	td->td_standin = spare;
 	bzero(&spare->td_startzero,
 	    __rangeof(struct thread, td_startzero, td_endzero));
+	bzero(&spare->td_osd, sizeof(struct osd));
 	spare->td_proc = td->td_proc;
 	spare->td_ucred = crhold(td->td_ucred);
 	spare->td_flags = TDF_INMEM;

Modified: stable/7/sys/kern/kern_thr.c
==============================================================================
--- stable/7/sys/kern/kern_thr.c	Wed May 20 22:28:55 2009	(r192492)
+++ stable/7/sys/kern/kern_thr.c	Wed May 20 22:30:57 2009	(r192493)
@@ -199,6 +199,7 @@ create_thread(struct thread *td, mcontex
 	    __rangeof(struct thread, td_startzero, td_endzero));
 	bcopy(&td->td_startcopy, &newtd->td_startcopy,
 	    __rangeof(struct thread, td_startcopy, td_endcopy));
+	bzero(&newtd->td_osd, sizeof(struct osd));
 	newtd->td_proc = td->td_proc;
 	newtd->td_ucred = crhold(td->td_ucred);
 


More information about the svn-src-stable-7 mailing list