public inbox for linux-ia64@vger.kernel.org
 help / color / mirror / Atom feed
* Double spin_unlock in bte.c
@ 2004-10-14 11:40 Robin Holt
  2004-10-14 21:00 ` Jesse Barnes
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Robin Holt @ 2004-10-14 11:40 UTC (permalink / raw)
  To: linux-ia64


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) {

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2004-10-19 19:45 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-10-14 11:40 Double spin_unlock in bte.c Robin Holt
2004-10-14 21:00 ` Jesse Barnes
2004-10-15  5:18 ` Luck, Tony
2004-10-18 17:02 ` Pat Gefre
2004-10-18 21:34 ` Robin Holt
2004-10-19 19:45 ` Pat Gefre

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox