Re: sys_mlock/sys_munlock

From: Petr Vandrovec (VANDROVE@vc.cvut.cz)
Date: Fri Oct 06 2000 - 17:05:12 EST


On 6 Oct 00 at 17:45, Atul Mukker. wrote:
> Hi,
> Can i use sys_mlock and sys_munlock in my driver module to lock/unlock the
> user address pages.
>
> Thanks
>
> P.S. Please mark your mail CC to atulm@ami.com

VMware's vmmon and in-kernel raw devices (and kiobufs) use simple
incrementing/decrementing page count - first cause pagein (vmmon uses
get_user(), kiobufs something more sophisticated), then use get_page
on that page. To release, use put_page().

But do not forget to look at my today's report about page->mapping == NULL...
If you'll do it with shared-mapped pages, and someone truncates file
they are mapped from, bad things can happen under 2.4.0 :-(
                                        Best regards,
                                            Petr Vandrovec
                                            vandrove@vc.cvut.cz
                                            
-
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 : Sat Oct 07 2000 - 21:00:19 EST