[bug] set_pgdir can skip mm's

From: V Ganesh (ganesh@veritas.com)
Date: Fri Nov 24 2000 - 07:38:15 EST


set_pgdir() needs to modify all active mm's to include the new entry.
what it really does is
        for_each_task(p) {
                if (!p->mm)
                        continue;
                *pgd_offset(p->mm,address) = entry;
        }

however, there could be a lazy-tlb thread on another cpu whose active_mm
belongs to a process which is dead and gone, and hence won't be covered by the
above code. if this thread then accesses an address covered by this entry, it
would fault.
ideally, we ought to loop through a list of all mm's rather than processes.
but since we don't have such a list, an easier solution is to use p->active_mm
rather than p->mm. this can cause multiple updates of the same pgd, but
the number of such unnecessary extra updates is bound by the number of CPUs.

ganesh
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Thu Nov 30 2000 - 21:00:11 EST