What's with set_pgdir?

Jeff Dike (jdike@karaya.com)
Mon, 13 Dec 1999 10:35:46 -0500


Whenever vmalloc is called, it calls set_pgdir to add any new pgdir entries to
all process page tables.

I blindly copied it from include/asm-i386 to include/asm-um, and the following
happened to me:
vmalloc is called when swap is turned on
it allocates some memory, allocates a page for ptes, adds that page to
the kernel page table, and calls set_pgdir to update all of
the process page tables similarly
one of those processes exits
exit_mmap frees the process page table, including the one representing
the kernel vm entry
that page gets reallocated for some other purpose
the kernel page table is now corrupted

So, I have two questions:
What does it mean to have kernel vm entries in process page tables? Are
processes mapping kernel memory?
Why doesn't the above scenario happen on i386?

Jeff

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