Missing 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 =====
arch/i386/lib/usercopy.c +3 -1
@@ -541,8 +541,10 @@ goto survive; } -if (retval !=1 ) +if (retval !=1 ) { +up_read (¤t->mm->mmap_sem);break ; + } maddr =kmap_atomic (pg,KM_USER0 );memcpy (maddr + offset, from, len);
Signature · 1 line
Like most of life's problems, this one can be solved with bending. - Bender
Quoted 3 lines · Mark Frazer
Just browsing users of
get_user_pagestoday and noticed what might be a bug.
Looks like it. It can only hit old 80386 machines (that code is disabled by any CPU with a i486 MMU or better), and even then only when somebody does something silly, but yeah, looks like a real bug.
Linus