lkml.org 
[lkml]   [2003]   [Dec]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
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 13:59    [W:0.026 / U:0.012 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site