diff options
author | vh249@airwolf.cl.cam.ac.uk <vh249@airwolf.cl.cam.ac.uk> | 2005-03-07 14:32:50 +0000 |
---|---|---|
committer | vh249@airwolf.cl.cam.ac.uk <vh249@airwolf.cl.cam.ac.uk> | 2005-03-07 14:32:50 +0000 |
commit | b7c8087832883f882029465053493f232cfcb0cc (patch) | |
tree | 1f63dfcd898b6e1928ef0de918fa193309272a9f | |
parent | b819ef725ed198331dd24a4f95d8f9ddb7061014 (diff) | |
download | xen-b7c8087832883f882029465053493f232cfcb0cc.tar.gz xen-b7c8087832883f882029465053493f232cfcb0cc.tar.bz2 xen-b7c8087832883f882029465053493f232cfcb0cc.zip |
bitkeeper revision 1.1159.258.22 (422c6612riGtD5GGqVTNqhuli2WrwQ)
fix spinlock still held while leaving function in case of error
Signed-off-by: Vincent Hanquez <vincent@xensource.com>
-rw-r--r-- | BitKeeper/etc/logging_ok | 1 | ||||
-rw-r--r-- | linux-2.6.10-xen-sparse/arch/xen/i386/mm/ioremap.c | 7 |
2 files changed, 6 insertions, 2 deletions
diff --git a/BitKeeper/etc/logging_ok b/BitKeeper/etc/logging_ok index d1c20d6e5f..935727fd0b 100644 --- a/BitKeeper/etc/logging_ok +++ b/BitKeeper/etc/logging_ok @@ -63,4 +63,5 @@ tlh20@elite.cl.cam.ac.uk tlh20@labyrinth.cl.cam.ac.uk tw275@labyrinth.cl.cam.ac.uk tw275@striker.cl.cam.ac.uk +vh249@airwolf.cl.cam.ac.uk xenbk@gandalf.hpl.hp.com diff --git a/linux-2.6.10-xen-sparse/arch/xen/i386/mm/ioremap.c b/linux-2.6.10-xen-sparse/arch/xen/i386/mm/ioremap.c index efd4663bcc..6d675b449a 100644 --- a/linux-2.6.10-xen-sparse/arch/xen/i386/mm/ioremap.c +++ b/linux-2.6.10-xen-sparse/arch/xen/i386/mm/ioremap.c @@ -354,22 +354,25 @@ int __direct_remap_area_pages(struct mm_struct *mm, { pgd_t * dir; unsigned long end = address + size; + int error; dir = pgd_offset(mm, address); if (address >= end) BUG(); spin_lock(&mm->page_table_lock); do { + error = -ENOMEM; pmd_t *pmd = pmd_alloc(mm, dir, address); if (!pmd) - return -ENOMEM; + break; + error = 0; direct_remap_area_pmd(mm, pmd, address, end - address, &v); address = (address + PGDIR_SIZE) & PGDIR_MASK; dir++; } while (address && (address < end)); spin_unlock(&mm->page_table_lock); - return 0; + return error; } |