lkml.org 
[lkml]   [2003]   [Dec]   [18]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
DateThu, 18 Dec 2003 00:02:49 -0500
FromMark Frazer <>
SubjectMissing up_read after get_user_pages in arch/i386/lib/usercopy.c?
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@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 12:59    [from the cache]
©2003-2008