]> Zhao Yanbai Git Server - minix.git/commitdiff
SMP - Make sure that VM does not change pt of a process while kernel copies
authorTomas Hruby <tom@minix3.org>
Wed, 15 Sep 2010 14:11:19 +0000 (14:11 +0000)
committerTomas Hruby <tom@minix3.org>
Wed, 15 Sep 2010 14:11:19 +0000 (14:11 +0000)
kernel/arch/i386/memory.c

index e1307df69a602dd8ef816ce2e60f61d5c3907ed3..3650e900d0cc461c04b3cc9848865a6011b5e13a 100644 (file)
@@ -159,6 +159,8 @@ PRIVATE int lin_lin_copy(const struct proc *srcproc, vir_bytes srclinaddr,
        if(dstproc) assert(!RTS_ISSET(dstproc, RTS_SLOT_FREE));
        assert(!RTS_ISSET(get_cpulocal_var(ptproc), RTS_SLOT_FREE));
        assert(get_cpulocal_var(ptproc)->p_seg.p_cr3_v);
+       if(srcproc) assert(!RTS_ISSET(srcproc, RTS_VMINHIBIT));
+       if(dstproc) assert(!RTS_ISSET(dstproc, RTS_VMINHIBIT));
 
        while(bytes > 0) {
                phys_bytes srcptr, dstptr;