2000-11-24 13:09:41

by V Ganesh

[permalink] [raw]
Subject: [bug] set_pgdir can skip mm's

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


2000-11-24 14:19:28

by V Ganesh

[permalink] [raw]
Subject: Re: [bug] set_pgdir can skip mm's

> From ganesh Fri Nov 24 18:08:15 2000

[ set_pgdir() blah blah blah ]

damn. I was looking at test9 and as usual after shooting my mouth off on l-k
I go look at test11 and find it's fixed there, at least in i386, thanks to
the vmalloc_fault: stuff in do_page_fault. but a lot of other architectures
still use the old method.

ganesh