Skip to contentSkip to conversation

get_user_pages() and process termination

DISCUSSION Timur Tabi 2 participants 2 messages May 31, 2005 – Jun 1, 2005

lore
Share & tools
lore

Timur Tabi

author
#0 lore raw

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
#1 lore raw
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.