arm64: bzero buffer for ucontext in freebsd32_swapcontext().

This change is the same as r340994 for amd64.

PR:	237922
Submitted by:	Young <yangx92@hotmail.com>
MFC after:	3 days
This commit is contained in:
Konstantin Belousov 2019-05-16 13:00:35 +00:00
parent f41ad4eaa7
commit 98fc918f41

View File

@ -284,6 +284,7 @@ freebsd32_swapcontext(struct thread *td, struct freebsd32_swapcontext_args *uap)
if (uap->oucp == NULL || uap->ucp == NULL)
ret = EINVAL;
else {
bzero(&uc, sizeof(uc));
get_mcontext32(td, &uc.uc_mcontext, GET_MC_CLEAR_RET);
PROC_LOCK(td->td_proc);
uc.uc_sigmask = td->td_sigmask;