diff options
author | cognet <cognet@FreeBSD.org> | 2006-01-27 21:07:04 +0000 |
---|---|---|
committer | cognet <cognet@FreeBSD.org> | 2006-01-27 21:07:04 +0000 |
commit | c5069da841fe1d13c1e22517ee3510ffc0525eca (patch) | |
tree | 2891fe9c6fe65a7bd63adca4c2ae93aeeaf660e2 | |
parent | c5764c76fc3093f008067d151ad40da325951dc1 (diff) | |
download | FreeBSD-src-c5069da841fe1d13c1e22517ee3510ffc0525eca.zip FreeBSD-src-c5069da841fe1d13c1e22517ee3510ffc0525eca.tar.gz |
Try harder not to recurse.
-rw-r--r-- | sys/arm/arm/vm_machdep.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/arm/arm/vm_machdep.c b/sys/arm/arm/vm_machdep.c index 54e5d34..3e7debc 100644 --- a/sys/arm/arm/vm_machdep.c +++ b/sys/arm/arm/vm_machdep.c @@ -477,9 +477,11 @@ retry: "smallalloc", 0); in_sleep--; goto retry; + } else if (in_alloc) { + mtx_unlock(&smallalloc_mtx); + return (NULL); } - if (wait & M_WAITOK) - in_alloc = 1; + in_alloc = 1; mtx_unlock(&smallalloc_mtx); /* Try to alloc 1MB of contiguous memory. */ ret = arm_uma_do_alloc(&sp, bytes, zone == l2zone ? |