git: c2ee4dfd0497 - main - ia32_get_fpcontext(): xfpusave can be legitimately NULL
Konstantin Belousov
kib at FreeBSD.org
Tue Sep 21 21:17:12 UTC 2021
The branch main has been updated by kib:
URL: https://cgit.FreeBSD.org/src/commit/?id=c2ee4dfd04970f1597eea58bb30eb93e1ed5a491
commit c2ee4dfd04970f1597eea58bb30eb93e1ed5a491
Author: Konstantin Belousov <kib at FreeBSD.org>
AuthorDate: 2021-09-21 21:09:34 +0000
Commit: Konstantin Belousov <kib at FreeBSD.org>
CommitDate: 2021-09-21 21:17:06 +0000
ia32_get_fpcontext(): xfpusave can be legitimately NULL
Reported by: cy
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Fixes: bd9e0f5df681da8b5ef05
---
sys/amd64/ia32/ia32_signal.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/sys/amd64/ia32/ia32_signal.c b/sys/amd64/ia32/ia32_signal.c
index 1ca19072a1dc..ab7100f5b9fb 100644
--- a/sys/amd64/ia32/ia32_signal.c
+++ b/sys/amd64/ia32/ia32_signal.c
@@ -99,6 +99,8 @@ ia32_get_fpcontext(struct thread *td, struct ia32_mcontext *mcp,
bcopy(get_pcb_user_save_td(td), &mcp->mc_fpstate[0],
sizeof(mcp->mc_fpstate));
mcp->mc_fpformat = fpuformat();
+ if (xfpusave == NULL)
+ return;
if (!use_xsave || cpu_max_ext_state_size <= sizeof(struct savefpu)) {
*xfpusave_len = 0;
*xfpusave = NULL;
More information about the dev-commits-src-main
mailing list