Module Name: src Committed By: martin Date: Wed Jul 3 18:12:35 UTC 2024
Modified Files: src/sys/arch/powerpc/oea [netbsd-10]: altivec.c Log Message: Pull up following revision(s) (requested by tsutsui in ticket #732): sys/arch/powerpc/oea/altivec.c: revision 1.35 don't do anything in vec_restore_from_mcontext() if no altivec. fixes a crash seen on netbsd-10 in PR#58283. To generate a diff of this commit: cvs rdiff -u -r1.34 -r1.34.4.1 src/sys/arch/powerpc/oea/altivec.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/arch/powerpc/oea/altivec.c diff -u src/sys/arch/powerpc/oea/altivec.c:1.34 src/sys/arch/powerpc/oea/altivec.c:1.34.4.1 --- src/sys/arch/powerpc/oea/altivec.c:1.34 Sat Oct 30 19:44:56 2021 +++ src/sys/arch/powerpc/oea/altivec.c Wed Jul 3 18:12:35 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: altivec.c,v 1.34 2021/10/30 19:44:56 thorpej Exp $ */ +/* $NetBSD: altivec.c,v 1.34.4.1 2024/07/03 18:12:35 martin Exp $ */ /* * Copyright (C) 1996 Wolfgang Solfrank. @@ -32,7 +32,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: altivec.c,v 1.34 2021/10/30 19:44:56 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: altivec.c,v 1.34.4.1 2024/07/03 18:12:35 martin Exp $"); #include <sys/param.h> #include <sys/proc.h> @@ -163,6 +163,10 @@ vec_restore_from_mcontext(struct lwp *l, KASSERT(l == curlwp); + /* Nothing to do here. */ + if (!vec_used_p(l)) + return; + /* we don't need to save the state, just drop it */ pcu_discard(&vec_ops, l, true);