kandeshvari / phantomuserland

Automatically exported from code.google.com/p/phantomuserland
GNU Lesser General Public License v3.0
1 stars 0 forks source link

Snapshot code may stop on mutex and become non-atomic #114

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
See vm_map.c:

// we depend on do_for not modifying interrupts disable status
// XXX BUG? Mutex lock can switch thread and it means that interrupts will be 
enabled
void
vm_map_do_for( vmem_page_func_t func, bool_vmem_page_func_t predicate )

vm_map_do_for requests mutex and, therefore, can be switched off the CPU if 
some page's mutex is taken (by pagefault, for example)

Original issue reported on code.google.com by d...@dz.ru on 19 Jul 2011 at 9:49

GoogleCodeExporter commented 9 years ago

Original comment by dmitry.zavalishin@gmail.com on 19 Jul 2011 at 9:50

GoogleCodeExporter commented 9 years ago
Only snapper and VM are supposed to take page mutex.
With this assumption there were no possibility to perform mark_for_snap 
non-atomically.
Revision 1034 guarantees mark_for_snap atomicity and adds that assertion.

Original comment by jcmvb...@gmail.com on 22 Jul 2011 at 6:00