get_user_pages() and process termination
If I call get_user_pages() on some pages owned by a process, and then the process exits, are the pages still pinned, or is there some kind of automatic cleanup?
Signature · 7 lines
Timur Tabi Staff Software Engineer [email protected] One thing a Southern boy will never say is, "I don't think duct tape will fix it." -- Ed Smylie, NASA engineer for Apollo 13
Quoted 3 lines · Timur Tabi
If I call
get_user_pages()on some pages owned by a process, and then the process exits,
are the pages still pinned, or is there some kind of automatic cleanup?
get_user_pages() will pin the pages for you. You now own the additional refcount on those pages. You must run put_page() against each page to avoid leaking them.