Removing VM_LOCKED from user memory

From: Rolf Eike Beer
Date: Wed Apr 25 2007 - 08:29:56 EST


Hi,

I need some assistance handling a large memory segment of a user process.

The user calls the kernel with a address and a length of it's own memory. My
driver will lock this memory using get_user_pages(). This memory is used as
DMA buffer directly from or to user processes.

Everything works fine that far: allocating, DMA mapping, DMA transfers. But I
currently can't get rid of the buffer again. Which function would help me to
get all pages unlocked once the buffer isn't needed anymore?

Is it enough to simply call sys_munlock() from the release and cleanup
functions?

There are no plans to share these mappings between different processes.

Greetings,

Eike

Attachment: signature.asc
Description: This is a digitally signed message part.