Re: [Question] Can we release vma that include code when one processis running?

From: Nick Piggin
Date: Thu Sep 15 2005 - 07:46:49 EST


liyu@WAN wrote:

It seem that code in other place jump here to enter kernel. this is in a anonymous
code area.
At first time, I think this SIGSEGV will trigger by anonymous code that is swapped,
but I wrote one specical condition check to filte out this sort of code, IOW, I do
not swap out it. but I still get SIGSEGV.

May be, we can not be release the vma that include code? or, Is there have some errors
in my words for page fault?


That's right, you cannot release the VMA if the application still
expects to use memory in that area. The page fault handler will
see that no VMA exists in that region and raise a SIGSEGV.

See arch/i386/mm/fault.c:do_page_fault


Nick

--
SUSE Labs, Novell Inc.

Send instant messages to your online friends http://au.messenger.yahoo.com -
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/