mirror of
https://github.com/opnsense/src.git
synced 2026-06-11 09:41:03 -04:00
Check we are in a critical section when calling vfp_discard. As we may call
it with a NULL thread pointer only check when it is non-NULL. Obtained from: ABT Systems Ltd Sponsored by: The FreeBSD Foundation
This commit is contained in:
parent
2698bbbb5a
commit
403ddccb10
1 changed files with 4 additions and 0 deletions
|
|
@ -79,6 +79,10 @@ void
|
|||
vfp_discard(struct thread *td)
|
||||
{
|
||||
|
||||
#ifdef INVARIANTS
|
||||
if (td != NULL)
|
||||
CRITICAL_ASSERT(td);
|
||||
#endif
|
||||
if (PCPU_GET(fpcurthread) == td)
|
||||
PCPU_SET(fpcurthread, NULL);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue