lkml.org 
[lkml]   [1999]   [Aug]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: fyi: pre2.3.13-7,8 boot failures


Oops, there's a silly bug in __request_region() that bites you if you have
resource clashes. We don't correctly clean up, so we return a half-assed
"successful" allocation for some cases we definitely should not..

It then crashes in __release_region() because the bad success we returned
had not actually been initialized as a successful resource.

Does this simple patch fix it for you?

Linus

----
--- linux-pre8/kernel/resource.c Thu Aug 5 18:24:21 1999
+++ linux/kernel/resource.c Sat Aug 7 11:08:54 1999
@@ -145,7 +145,7 @@

write_lock(&resource_lock);

- while (!(parent->flags & IORESOURCE_BUSY)) {
+ for (;;) {
struct resource *conflict;

conflict = __request_resource(parent, res);
@@ -153,7 +153,8 @@
break;
if (conflict != parent) {
parent = conflict;
- continue;
+ if (!(conflict->flags & IORESOURCE_BUSY))
+ continue;
}

/* Uhhuh, that didn't work out.. */

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:53    [W:0.027 / U:1.212 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site