lkml.org 
[lkml]   [2004]   [Sep]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectEXT3: problem with copy_from_user inside a transaction
Hi Andrew,

filemap_copy_from_user() between prepare_write() and commit_write()
appears to be a problem for ext3.

prepare_write() starts a transaction, and if filemap_copy_from_user() causes
a page fault, we'll have
- order violation with mmap_sem taken inside a transaction (possible
deadlocks),
- __GFP_FS memory allocation with all re-entrancy problems (e.g.,
current->journal_info corruption).

Am I missing something?

If this observation is correct, the possible solution is to call
get_user_pages() or somehow pin the user pages before prepare_write(),
although it will hurt performance...

Andrey
-
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 14:05    [W:0.077 / U:0.060 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site