On Fri 21-08-20 09:24:02, Michal Hocko wrote: > On Fri 21-08-20 08:51:57, Sumit Semwal wrote: [...] > > Indeed. so does it sound ok to add an access_remote_vma_mmap_lockheld() version? > > You will still need to take the lock if the pointer belongs to a remote > address space. But how are you going to find out? Scratch that. I didn't realize prctl is always called with the current context. So there will never be a pointer from a remote process. Going with a variant which doesn't take mmap_sem would be safe. Sorry about the confusion. -- Michal Hocko SUSE Labs