Missing up_read after get_user_pages in arch/i386/lib/usercopy.c?

From: Mark Frazer
Date: Thu Dec 18 2003 - 00:04:00 EST


Just browsing users of get_user_pages today and noticed what might be a
bug.

===== arch/i386/lib/usercopy.c 1.15 vs edited =====
--- 1.15/arch/i386/lib/usercopy.c Thu Aug 21 01:31:58 2003
+++ edited/arch/i386/lib/usercopy.c Wed Dec 17 23:59:16 2003
@@ -541,8 +541,10 @@
goto survive;
}

- if (retval != 1)
+ if (retval != 1) {
+ up_read(&current->mm->mmap_sem);
break;
+ }

maddr = kmap_atomic(pg, KM_USER0);
memcpy(maddr + offset, from, len);


--
Like most of life's problems, this one can be solved with bending. - Bender
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/