diff options
author | kensmith <kensmith@FreeBSD.org> | 2004-09-27 12:34:47 +0000 |
---|---|---|
committer | kensmith <kensmith@FreeBSD.org> | 2004-09-27 12:34:47 +0000 |
commit | 2e0cfb5fb7a91339fcb985617e592a8070b11305 (patch) | |
tree | 7f2c100629ee676038300c99fef458af7915498d /sys/sparc64 | |
parent | c96236a596468f9a094ba362e92f94e534b1c926 (diff) | |
download | FreeBSD-src-2e0cfb5fb7a91339fcb985617e592a8070b11305.zip FreeBSD-src-2e0cfb5fb7a91339fcb985617e592a8070b11305.tar.gz |
Initialize the count of saved register windows to 0 in the pcb created
for the new thread. The rest of the fields in the pcb wind up being
written to before they're read as a normal part of the pcb usage but
this field may be read upon return to userland, having it be uninitialized
garbage is bad.
Submitted by: Andrew Belashov (bel at orel dot ru)
Reviewed by: jake
MFC after: 3 days
Diffstat (limited to 'sys/sparc64')
-rw-r--r-- | sys/sparc64/sparc64/vm_machdep.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/sparc64/sparc64/vm_machdep.c b/sys/sparc64/sparc64/vm_machdep.c index 4a34567..70d4451 100644 --- a/sys/sparc64/sparc64/vm_machdep.c +++ b/sys/sparc64/sparc64/vm_machdep.c @@ -141,6 +141,7 @@ cpu_thread_setup(struct thread *td) pcb = (struct pcb *)((td->td_kstack + td->td_kstack_pages * PAGE_SIZE - sizeof(struct pcb)) & ~0x3fUL); + pcb->pcb_nsaved = 0; td->td_frame = (struct trapframe *)pcb - 1; td->td_pcb = pcb; } |