spin_lock(&current->mm->page_table_lock); page = follow_page(mm, uaddr, 0); 
page = follow_page(mm, uaddr, FOLL_TOUCH|FOLL_GET); 
static int get_futex_key(unsigned long uaddr, union futex_key *key){	struct mm_struct *mm = current->mm;	struct vm_area_struct *vma;	struct page *page;	int err;	/*	 * The futex address must be "naturally" aligned.	 */	key->both.offset = uaddr % PAGE_SIZE;	if (unlikely((key->both.offset % sizeof(u32)) != 0))		return -EINVAL;	uaddr -= key->both.offset;	/*	 * The futex is hashed differently depending on whether	 * it's in a shared or private mapping.  So check vma first.	 */	vma = find_extend_vma(mm, uaddr);	if (unlikely(!vma))		return -EFAULT;	/*	 * Permissions.	 */	if (unlikely((vma->vm_flags & (VM_IO|VM_READ)) != VM_READ))		return (vma->vm_flags & VM_IO) ? -EPERM : -EACCES;	/*	 * Private mappings are handled in a simple way.	 *	 * NOTE: When userspace waits on a MAP_SHARED mapping, even if	 * it's a read-only handle, it's expected that futexes attach to	 * the object not the particular process.  Therefore we use	 * VM_MAYSHARE here, not VM_SHARED which is restricted to shared	 * mappings of _writable_ handles.	 */	if (likely(!(vma->vm_flags & VM_MAYSHARE))) {		key->private.mm = mm;		key->private.uaddr = uaddr;		return 0;	}	/*	 * Linear file mappings are also simple.	 */	key->shared.inode = vma->vm_file->f_dentry->d_inode;	key->both.offset++; /* Bit 0 of offset indicates inode-based key. */	if (likely(!(vma->vm_flags & VM_NONLINEAR))) {		key->shared.pgoff = (((uaddr - vma->vm_start) >> PAGE_SHIFT)				     + vma->vm_pgoff);		return 0;	}	/*	 * We could walk the page table to read the non-linear	 * pte, and get the page index without fetching the page	 * from swap.  But that's a lot of code to duplicate here	 * for a rare case, so we simply fetch the page.	 */	/*	 * Do a quick atomic lookup first - this is the fastpath.	 */	spin_lock(&current->mm->page_table_lock);	page = follow_page(mm, uaddr, 0);	if (likely(page != NULL)) {		key->shared.pgoff =			page->index << (PAGE_CACHE_SHIFT - PAGE_SHIFT);		spin_unlock(&current->mm->page_table_lock);		return 0;	}	spin_unlock(&current->mm->page_table_lock);	/*	 * Do it the general way.	 */	err = get_user_pages(current, mm, uaddr, 1, 0, 0, &page, NULL);	if (err >= 0) {		key->shared.pgoff =			page->index << (PAGE_CACHE_SHIFT - PAGE_SHIFT);		put_page(page);		return 0;	}	return err;}
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/deceb6cd17e6dfafe4c4f81b1b4153bc41b2cb70/futex.c/buggy/kernel/futex.c