Lines Matching refs:user_mm
689 struct user_event_mm *user_mm; in user_event_mm_alloc() local
691 user_mm = kzalloc(sizeof(*user_mm), GFP_KERNEL_ACCOUNT); in user_event_mm_alloc()
693 if (!user_mm) in user_event_mm_alloc()
696 user_mm->mm = t->mm; in user_event_mm_alloc()
697 INIT_LIST_HEAD(&user_mm->enablers); in user_event_mm_alloc()
698 refcount_set(&user_mm->refcnt, 1); in user_event_mm_alloc()
699 refcount_set(&user_mm->tasks, 1); in user_event_mm_alloc()
709 mmgrab(user_mm->mm); in user_event_mm_alloc()
711 return user_mm; in user_event_mm_alloc()
714 static void user_event_mm_attach(struct user_event_mm *user_mm, struct task_struct *t) in user_event_mm_attach() argument
719 list_add_rcu(&user_mm->mms_link, &user_event_mms); in user_event_mm_attach()
722 t->user_event_mm = user_mm; in user_event_mm_attach()
727 struct user_event_mm *user_mm = current->user_event_mm; in current_user_event_mm() local
729 if (user_mm) in current_user_event_mm()
732 user_mm = user_event_mm_alloc(current); in current_user_event_mm()
734 if (!user_mm) in current_user_event_mm()
737 user_event_mm_attach(user_mm, current); in current_user_event_mm()
739 refcount_inc(&user_mm->refcnt); in current_user_event_mm()
741 return user_mm; in current_user_event_mm()
850 struct user_event_mm *user_mm = current_user_event_mm(); in current_user_event_enabler_exists() local
853 if (!user_mm) in current_user_event_enabler_exists()
856 exists = user_event_enabler_exists(user_mm, uaddr, bit); in current_user_event_enabler_exists()
858 user_event_mm_put(user_mm); in current_user_event_enabler_exists()
868 struct user_event_mm *user_mm; in user_event_enabler_create() local
872 user_mm = current_user_event_mm(); in user_event_enabler_create()
874 if (!user_mm) in user_event_enabler_create()
896 mmap_read_lock(user_mm->mm); in user_event_enabler_create()
897 *write_result = user_event_enabler_write(user_mm, enabler, false, in user_event_enabler_create()
899 mmap_read_unlock(user_mm->mm); in user_event_enabler_create()
911 list_add_rcu(&enabler->mm_enablers_link, &user_mm->enablers); in user_event_enabler_create()
918 if (!user_event_mm_fault_in(user_mm, uaddr, attempt)) in user_event_enabler_create()
925 user_event_mm_put(user_mm); in user_event_enabler_create()
2510 static int user_event_mm_clear_bit(struct user_event_mm *user_mm, in user_event_mm_clear_bit() argument
2526 mmap_read_lock(user_mm->mm); in user_event_mm_clear_bit()
2527 result = user_event_enabler_write(user_mm, &enabler, false, &attempt); in user_event_mm_clear_bit()
2528 mmap_read_unlock(user_mm->mm); in user_event_mm_clear_bit()
2534 if (!user_event_mm_fault_in(user_mm, uaddr, attempt)) in user_event_mm_clear_bit()