1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-03 09:00:21 +00:00

In vfp_save_state(), don't bother trying to save the VFP registers if the

provided PCB doesn't have a pcb_fpusaved. All PCBs associated to a thread
should have one, but the dumppcb used when panic'ing doesn't.
This commit is contained in:
Olivier Houchard 2018-05-17 22:38:16 +00:00
parent a5f1042498
commit 654a792922
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=333771

View File

@ -170,6 +170,15 @@ vfp_save_state(struct thread *td, struct pcb *pcb)
KASSERT(pcb != NULL, ("NULL vfp pcb"));
KASSERT(td == NULL || td->td_pcb == pcb, ("Invalid vfp pcb"));
/*
* savectx() will be called on panic with dumppcb as an argument,
* dumppcb doesn't have pcb_fpusaved set so don't make any attempt
* to store the VFP registers in it, we probably don't care much
* at that point, anyway.
*/
if (pcb->pcb_fpusaved == NULL)
return;
if (td == NULL)
td = curthread;