All of lore.kernel.org
 help / color / mirror / Atom feed
* EXT3: problem with copy_from_user inside a transaction
@ 2004-09-03 11:05 Andrey Savochkin
  2004-09-03 12:35 ` Andrea Arcangeli
  0 siblings, 1 reply; 9+ messages in thread
From: Andrey Savochkin @ 2004-09-03 11:05 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-kernel

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

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2004-09-07 11:56 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-09-03 11:05 EXT3: problem with copy_from_user inside a transaction Andrey Savochkin
2004-09-03 12:35 ` Andrea Arcangeli
2004-09-03 12:06   ` Chris Mason
2004-09-03 13:03     ` Andrea Arcangeli
2004-09-03 13:57     ` Andrey Savochkin
2004-09-04  7:47       ` Chris Mason
2004-09-04 14:33         ` Andrey Savochkin
2004-09-04 20:12           ` Andrey Savochkin
2004-09-07 11:55     ` [RFC][PATCH] " Andrey Savochkin

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.