efirt efi_enter(): Release acquired locks and restore FPU ownership if
efi_arch_enter() returned an error. Submitted: Jan Martin Mikkelsen <janm@transactionware.com> MFC after: 1 week
This commit is contained in:
parent
ff37a4216d
commit
19683a7031
@ -275,6 +275,7 @@ efi_enter(void)
|
||||
{
|
||||
struct thread *td;
|
||||
pmap_t curpmap;
|
||||
int error;
|
||||
|
||||
if (efi_runtime == NULL)
|
||||
return (ENXIO);
|
||||
@ -283,7 +284,13 @@ efi_enter(void)
|
||||
PMAP_LOCK(curpmap);
|
||||
mtx_lock(&efi_lock);
|
||||
fpu_kern_enter(td, NULL, FPU_KERN_NOCTX);
|
||||
return (efi_arch_enter());
|
||||
error = efi_arch_enter();
|
||||
if (error != 0) {
|
||||
fpu_kern_leave(td, NULL);
|
||||
mtx_unlock(&efi_lock);
|
||||
PMAP_UNLOCK(curpmap);
|
||||
}
|
||||
return (error);
|
||||
}
|
||||
|
||||
static void
|
||||
|
Loading…
x
Reference in New Issue
Block a user