Commit 42ae05cd authored by Robin Holt's avatar Robin Holt Committed by Tony Luck

[IA64-SGI] Double spin_unlock in bte.c

If all bte interfaces are in use, the current code will leave the
bte pointer set when exiting from the loop trying to locate an
interface to use.  This results in two processes using the same
interface and both trying to free the same one.  With a
premptible kernel, this results in the preempt count getting
off.
Signed-off-by: default avatarRobin Holt <holt@sgi.com>
Signed-off-by: default avatarTony Luck <tony.luck@intel.com>
parent 82c16c41
...@@ -125,12 +125,12 @@ bte_result_t bte_copy(u64 src, u64 dest, u64 len, u64 mode, void *notification) ...@@ -125,12 +125,12 @@ bte_result_t bte_copy(u64 src, u64 dest, u64 len, u64 mode, void *notification)
(BTE_LNSTAT_LOAD(bte) & BTE_ACTIVE)) { (BTE_LNSTAT_LOAD(bte) & BTE_ACTIVE)) {
/* Got the lock but BTE still busy */ /* Got the lock but BTE still busy */
spin_unlock(&bte->spinlock); spin_unlock(&bte->spinlock);
bte = NULL;
} else { } else {
/* we got the lock and it's not busy */ /* we got the lock and it's not busy */
break; break;
} }
} }
bte = NULL;
} }
if (bte != NULL) { if (bte != NULL) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment