Double spin_unlock in bte.c

From: Robin Holt <holt_at_sgi.com>
Date: 2004-10-14 21:40:03
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


Index: linux-2.6/arch/ia64/sn/kernel/bte.c
===================================================================
--- linux-2.6.orig/arch/ia64/sn/kernel/bte.c	2004-10-06 11:48:25.000000000 -0500
+++ linux-2.6/arch/ia64/sn/kernel/bte.c	2004-10-14 06:34:45.000000000 -0500
@@ -131,12 +131,12 @@
 				    (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) {
-
To unsubscribe from this list: send the line "unsubscribe linux-ia64" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Received on Thu Oct 14 07:40:19 2004

This archive was generated by hypermail 2.1.8 : 2005-08-02 09:20:31 EST