FreeBSD Bugzilla – Attachment 103503 Details for
Bug 143432
[acpi] [patch] Two bugs in acpica in AcpiExReleaseMutex
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
mutex.patch
mutex.patch (text/x-patch), 2.68 KB, created by
ming.m.lin
on 2010-02-02 02:40:23 UTC
(
hide
)
Description:
mutex.patch
Filename:
MIME Type:
Creator:
ming.m.lin
Created:
2010-02-02 02:40:23 UTC
Size:
2.68 KB
patch
obsolete
>diff --git a/source/components/executer/exmutex.c b/source/components/executer/exmutex.c >index d0aa9de..0a4048d 100644 >--- a/source/components/executer/exmutex.c >+++ b/source/components/executer/exmutex.c >@@ -471,6 +471,7 @@ AcpiExReleaseMutex ( > { > ACPI_STATUS Status = AE_OK; > UINT8 PreviousSyncLevel; >+ ACPI_THREAD_STATE *OwnerThread; > > > ACPI_FUNCTION_TRACE (ExReleaseMutex); >@@ -481,9 +482,11 @@ AcpiExReleaseMutex ( > return_ACPI_STATUS (AE_BAD_PARAMETER); > } > >+ OwnerThread = ObjDesc->Mutex.OwnerThread; >+ > /* The mutex must have been previously acquired in order to release it */ > >- if (!ObjDesc->Mutex.OwnerThread) >+ if (!OwnerThread) > { > ACPI_ERROR ((AE_INFO, "Cannot release Mutex [%4.4s], not acquired", > AcpiUtGetNodeName (ObjDesc->Mutex.Node))); >@@ -503,14 +506,14 @@ AcpiExReleaseMutex ( > * The Mutex is owned, but this thread must be the owner. > * Special case for Global Lock, any thread can release > */ >- if ((ObjDesc->Mutex.OwnerThread->ThreadId != WalkState->Thread->ThreadId) && >+ if ((OwnerThread->ThreadId != WalkState->Thread->ThreadId) && > (ObjDesc != AcpiGbl_GlobalLockMutex)) > { > ACPI_ERROR ((AE_INFO, > "Thread %p cannot release Mutex [%4.4s] acquired by thread %p", > ACPI_CAST_PTR (void, WalkState->Thread->ThreadId), > AcpiUtGetNodeName (ObjDesc->Mutex.Node), >- ACPI_CAST_PTR (void, ObjDesc->Mutex.OwnerThread->ThreadId))); >+ ACPI_CAST_PTR (void, OwnerThread->ThreadId))); > return_ACPI_STATUS (AE_AML_NOT_OWNER); > } > >@@ -521,7 +524,7 @@ AcpiExReleaseMutex ( > * different level can only mean that the mutex ordering rule is being > * violated. This behavior is clarified in ACPI 4.0 specification. > */ >- if (ObjDesc->Mutex.SyncLevel != WalkState->Thread->CurrentSyncLevel) >+ if (ObjDesc->Mutex.SyncLevel != OwnerThread->CurrentSyncLevel) > { > ACPI_ERROR ((AE_INFO, > "Cannot release Mutex [%4.4s], SyncLevel mismatch: mutex %d current %d", >@@ -536,7 +539,7 @@ AcpiExReleaseMutex ( > * acquired, but are not released in reverse order. > */ > PreviousSyncLevel = >- WalkState->Thread->AcquiredMutexList->Mutex.OriginalSyncLevel; >+ OwnerThread->AcquiredMutexList->Mutex.OriginalSyncLevel; > > Status = AcpiExReleaseMutexObject (ObjDesc); > if (ACPI_FAILURE (Status)) >@@ -548,7 +551,7 @@ AcpiExReleaseMutex ( > { > /* Restore the previous SyncLevel */ > >- WalkState->Thread->CurrentSyncLevel = PreviousSyncLevel; >+ OwnerThread->CurrentSyncLevel = PreviousSyncLevel; > } > return_ACPI_STATUS (Status); > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 143432
:
103502
| 103503 |
103504