On Mon, 03 Mar 2014 16:59:38 -0800 Davidlohr Bueso <davidlohr@xxxxxx> wrote: > > >... > > > > > > +static bool vmacache_valid(struct mm_struct *mm) > > > +{ > > > + struct task_struct *curr = current; > > > + > > > + if (mm != curr->mm) > > > + return false; > > > > What's going on here? Handling a task poking around in someone else's > > mm? I'm thinking "__access_remote_vm", but I don't know what you were > > thinking ;) An explanatory comment would be revealing. > > I don't understand the doubt here. Seems like a pretty obvious thing to > check -- yes it's probably unlikely but we certainly don't want to be > validating the cache on an mm that's not ours... or are you saying it's > redundant?? Well it has to be here for a reason and I'm wondering that that reason is. If nobody comes here with a foreign mm then let's remove it. Or perhaps stick a WARN_ON_ONCE() in there to detect the unexpected. If there _is_ a real reason, let's write that down. > And no, we don't want __access_remote_vm() here. __access_remote_vm doesn't look at the vma cache, so scrub that explanation. -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@xxxxxxxxx. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"dont@xxxxxxxxx"> email@xxxxxxxxx </a>