How to revoke mmap mappings

From: ralphc
Date: Thu Aug 10 2006 - 12:48:10 EST


I am looking for suggestions on how a device driver which implements
mmap() similar to the "scullv" example driver can revoke the
mapping. I would like the driver to be able to invalidate
all of the pages faulted in through struct vm_operations_struct.nopage
so that the vmalloc() memory can be freed. If the user process
tries to touch the mmap region afterwards, it will get a SIGBUS
or SIGSEGV.

I looked in mm/memory.c but unmap_mapping_range() and
vmtruncate() require file mappings so I don't think I
can use these.

-
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/