From 42ae05cd253415ccaaa96c8b432e5c40a351f3c4 Mon Sep 17 00:00:00 2001 From: Robin Holt Date: Tue, 19 Oct 2004 17:33:58 +0000 Subject: [PATCH] [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: Robin Holt Signed-off-by: Tony Luck --- arch/ia64/sn/kernel/bte.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/ia64/sn/kernel/bte.c b/arch/ia64/sn/kernel/bte.c index ce4e2ce5b58b8..4e05dfd0eb48e 100644 --- a/arch/ia64/sn/kernel/bte.c +++ b/arch/ia64/sn/kernel/bte.c @@ -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)) { /* Got the lock but BTE still busy */ spin_unlock(&bte->spinlock); - bte = NULL; } else { /* we got the lock and it's not busy */ break; } } + bte = NULL; } if (bte != NULL) { -- 2.53.0