• Home
  • Raw
  • Download

Lines Matching refs:ret

754 	int ret;  in fault_in_user_writeable()  local
757 ret = fixup_user_fault(current, mm, (unsigned long)uaddr, in fault_in_user_writeable()
761 return ret < 0 ? ret : 0; in fault_in_user_writeable()
786 int ret; in cmpxchg_futex_value_locked() local
789 ret = futex_atomic_cmpxchg_inatomic(curval, uaddr, uval, newval); in cmpxchg_futex_value_locked()
792 return ret; in cmpxchg_futex_value_locked()
797 int ret; in get_futex_value_locked() local
800 ret = __get_user(*dest, from); in get_futex_value_locked()
803 return ret ? -EFAULT : 0; in get_futex_value_locked()
1067 int ret; in attach_to_pi_state() local
1163 ret = -EINVAL; in attach_to_pi_state()
1167 ret = -EAGAIN; in attach_to_pi_state()
1171 ret = -EFAULT; in attach_to_pi_state()
1176 return ret; in attach_to_pi_state()
1185 static void wait_for_owner_exiting(int ret, struct task_struct *exiting) in wait_for_owner_exiting() argument
1187 if (ret != -EBUSY) { in wait_for_owner_exiting()
1192 if (WARN_ON_ONCE(ret == -EBUSY && !exiting)) in wait_for_owner_exiting()
1307 int ret = handle_exit_race(uaddr, uval, p); in attach_to_pi_owner() local
1319 if (ret == -EBUSY) in attach_to_pi_owner()
1323 return ret; in attach_to_pi_owner()
1429 int ret; in futex_lock_pi_atomic() local
1476 ret = lock_pi_update_atomic(uaddr, uval, newval); in futex_lock_pi_atomic()
1478 return ret < 0 ? ret : 1; in futex_lock_pi_atomic()
1487 ret = lock_pi_update_atomic(uaddr, uval, newval); in futex_lock_pi_atomic()
1488 if (ret) in futex_lock_pi_atomic()
1489 return ret; in futex_lock_pi_atomic()
1557 int ret = 0; in wake_futex_pi() local
1569 ret = -EAGAIN; in wake_futex_pi()
1581 ret = -EFAULT; in wake_futex_pi()
1583 ret = cmpxchg_futex_value_locked(&curval, uaddr, uval, newval); in wake_futex_pi()
1584 if (!ret && (curval != uval)) { in wake_futex_pi()
1592 ret = -EAGAIN; in wake_futex_pi()
1594 ret = -EINVAL; in wake_futex_pi()
1597 if (ret) in wake_futex_pi()
1624 return ret; in wake_futex_pi()
1660 int ret; in futex_wake() local
1666 ret = get_futex_key(uaddr, flags & FLAGS_SHARED, &key, FUTEX_READ); in futex_wake()
1667 if (unlikely(ret != 0)) in futex_wake()
1681 ret = -EINVAL; in futex_wake()
1690 if (++ret >= nr_wake) in futex_wake()
1700 return ret; in futex_wake()
1709 int oldval, ret; in futex_atomic_op_inuser() local
1728 ret = arch_futex_atomic_op_inuser(op, oparg, &oldval, uaddr); in futex_atomic_op_inuser()
1729 if (ret) in futex_atomic_op_inuser()
1730 return ret; in futex_atomic_op_inuser()
1761 int ret, op_ret; in futex_wake_op() local
1765 ret = get_futex_key(uaddr1, flags & FLAGS_SHARED, &key1, FUTEX_READ); in futex_wake_op()
1766 if (unlikely(ret != 0)) in futex_wake_op()
1768 ret = get_futex_key(uaddr2, flags & FLAGS_SHARED, &key2, FUTEX_WRITE); in futex_wake_op()
1769 if (unlikely(ret != 0)) in futex_wake_op()
1787 ret = op_ret; in futex_wake_op()
1792 ret = fault_in_user_writeable(uaddr2); in futex_wake_op()
1793 if (ret) in futex_wake_op()
1811 ret = -EINVAL; in futex_wake_op()
1815 if (++ret >= nr_wake) in futex_wake_op()
1825 ret = -EINVAL; in futex_wake_op()
1833 ret += op_ret; in futex_wake_op()
1844 return ret; in futex_wake_op()
1939 int ret, vpid; in futex_proxy_trylock_atomic() local
1971 ret = futex_lock_pi_atomic(pifutex, hb2, key2, ps, top_waiter->task, in futex_proxy_trylock_atomic()
1973 if (ret == 1) { in futex_proxy_trylock_atomic()
1977 return ret; in futex_proxy_trylock_atomic()
2003 int drop_count = 0, task_count = 0, ret; in futex_requeue() local
2050 ret = get_futex_key(uaddr1, flags & FLAGS_SHARED, &key1, FUTEX_READ); in futex_requeue()
2051 if (unlikely(ret != 0)) in futex_requeue()
2053 ret = get_futex_key(uaddr2, flags & FLAGS_SHARED, &key2, in futex_requeue()
2055 if (unlikely(ret != 0)) in futex_requeue()
2063 ret = -EINVAL; in futex_requeue()
2077 ret = get_futex_value_locked(&curval, uaddr1); in futex_requeue()
2079 if (unlikely(ret)) { in futex_requeue()
2083 ret = get_user(curval, uaddr1); in futex_requeue()
2084 if (ret) in futex_requeue()
2095 ret = -EAGAIN; in futex_requeue()
2109 ret = futex_proxy_trylock_atomic(uaddr2, hb1, hb2, &key1, in futex_requeue()
2122 if (ret > 0) { in futex_requeue()
2138 ret = lookup_pi_state(uaddr2, ret, hb2, &key2, in futex_requeue()
2142 switch (ret) { in futex_requeue()
2153 ret = fault_in_user_writeable(uaddr2); in futex_requeue()
2154 if (!ret) in futex_requeue()
2174 wait_for_owner_exiting(ret, exiting); in futex_requeue()
2199 ret = -EINVAL; in futex_requeue()
2215 ret = -EINVAL; in futex_requeue()
2231 ret = rt_mutex_start_proxy_lock(&pi_state->pi_mutex, in futex_requeue()
2234 if (ret == 1) { in futex_requeue()
2246 } else if (ret) { in futex_requeue()
2294 return ret ? ret : task_count; in futex_requeue()
2381 int ret = 0; in unqueue_me() local
2415 ret = 1; in unqueue_me()
2419 return ret; in unqueue_me()
2446 int ret, err = 0; in fixup_pi_state_owner() local
2484 ret = 0; in fixup_pi_state_owner()
2490 ret = 0; in fixup_pi_state_owner()
2506 ret = 0; in fixup_pi_state_owner()
2573 ret = fault_in_user_writeable(uaddr); in fixup_pi_state_owner()
2578 ret = 0; in fixup_pi_state_owner()
2583 ret = err; in fixup_pi_state_owner()
2594 ret = 0; in fixup_pi_state_owner()
2598 if (ret) in fixup_pi_state_owner()
2605 return ret; in fixup_pi_state_owner()
2627 int ret = 0; in fixup_owner() local
2639 ret = fixup_pi_state_owner(uaddr, q, current); in fixup_owner()
2652 ret = fixup_pi_state_owner(uaddr, q, NULL); in fixup_owner()
2662 "pi-state %p\n", ret, in fixup_owner()
2668 return ret ? ret : locked; in fixup_owner()
2730 int ret; in futex_wait_setup() local
2751 ret = get_futex_key(uaddr, flags & FLAGS_SHARED, &q->key, FUTEX_READ); in futex_wait_setup()
2752 if (unlikely(ret != 0)) in futex_wait_setup()
2753 return ret; in futex_wait_setup()
2758 ret = get_futex_value_locked(&uval, uaddr); in futex_wait_setup()
2760 if (ret) { in futex_wait_setup()
2763 ret = get_user(uval, uaddr); in futex_wait_setup()
2764 if (ret) in futex_wait_setup()
2776 ret = -EWOULDBLOCK; in futex_wait_setup()
2780 if (ret) in futex_wait_setup()
2782 return ret; in futex_wait_setup()
2792 int ret; in futex_wait() local
2805 ret = futex_wait_setup(uaddr, val, flags, &q, &hb); in futex_wait()
2806 if (ret) in futex_wait()
2813 ret = 0; in futex_wait()
2817 ret = -ETIMEDOUT; in futex_wait()
2828 ret = -ERESTARTSYS; in futex_wait()
2840 ret = -ERESTART_RESTARTBLOCK; in futex_wait()
2847 return ret; in futex_wait()
2885 int res, ret; in futex_lock_pi() local
2896 ret = get_futex_key(uaddr, flags & FLAGS_SHARED, &q.key, FUTEX_WRITE); in futex_lock_pi()
2897 if (unlikely(ret != 0)) in futex_lock_pi()
2903 ret = futex_lock_pi_atomic(uaddr, hb, &q.key, &q.pi_state, current, in futex_lock_pi()
2905 if (unlikely(ret)) { in futex_lock_pi()
2910 switch (ret) { in futex_lock_pi()
2913 ret = 0; in futex_lock_pi()
2932 wait_for_owner_exiting(ret, exiting); in futex_lock_pi()
2948 ret = rt_mutex_futex_trylock(&q.pi_state->pi_mutex); in futex_lock_pi()
2950 ret = ret ? 0 : -EWOULDBLOCK; in futex_lock_pi()
2976 ret = __rt_mutex_start_proxy_lock(&q.pi_state->pi_mutex, &rt_waiter, current); in futex_lock_pi()
2979 if (ret) { in futex_lock_pi()
2980 if (ret == 1) in futex_lock_pi()
2981 ret = 0; in futex_lock_pi()
2988 ret = rt_mutex_wait_proxy_lock(&q.pi_state->pi_mutex, to, &rt_waiter); in futex_lock_pi()
3001 if (ret && !rt_mutex_cleanup_proxy_lock(&q.pi_state->pi_mutex, &rt_waiter)) in futex_lock_pi()
3002 ret = 0; in futex_lock_pi()
3009 res = fixup_owner(uaddr, &q, !ret); in futex_lock_pi()
3015 ret = (res < 0) ? res : 0; in futex_lock_pi()
3021 if (ret && (rt_mutex_owner(&q.pi_state->pi_mutex) == current)) { in futex_lock_pi()
3046 return ret != -EINTR ? ret : -ERESTARTNOINTR; in futex_lock_pi()
3051 ret = fault_in_user_writeable(uaddr); in futex_lock_pi()
3052 if (ret) in futex_lock_pi()
3073 int ret; in futex_unlock_pi() local
3087 ret = get_futex_key(uaddr, flags & FLAGS_SHARED, &key, FUTEX_WRITE); in futex_unlock_pi()
3088 if (ret) in futex_unlock_pi()
3089 return ret; in futex_unlock_pi()
3103 ret = -EINVAL; in futex_unlock_pi()
3129 ret = wake_futex_pi(uaddr, uval, pi_state); in futex_unlock_pi()
3136 if (!ret) in futex_unlock_pi()
3142 if (ret == -EFAULT) in futex_unlock_pi()
3148 if (ret == -EAGAIN) in futex_unlock_pi()
3164 if ((ret = cmpxchg_futex_value_locked(&curval, uaddr, uval, 0))) { in futex_unlock_pi()
3166 switch (ret) { in futex_unlock_pi()
3182 ret = (curval == uval) ? 0 : -EAGAIN; in futex_unlock_pi()
3188 return ret; in futex_unlock_pi()
3198 ret = fault_in_user_writeable(uaddr); in futex_unlock_pi()
3199 if (!ret) in futex_unlock_pi()
3202 return ret; in futex_unlock_pi()
3226 int ret = 0; in handle_early_requeue_pi_wakeup() local
3245 ret = -EWOULDBLOCK; in handle_early_requeue_pi_wakeup()
3247 ret = -ETIMEDOUT; in handle_early_requeue_pi_wakeup()
3249 ret = -ERESTARTNOINTR; in handle_early_requeue_pi_wakeup()
3251 return ret; in handle_early_requeue_pi_wakeup()
3304 int res, ret; in futex_wait_requeue_pi() local
3324 ret = get_futex_key(uaddr2, flags & FLAGS_SHARED, &key2, FUTEX_WRITE); in futex_wait_requeue_pi()
3325 if (unlikely(ret != 0)) in futex_wait_requeue_pi()
3336 ret = futex_wait_setup(uaddr, val, flags, &q, &hb); in futex_wait_requeue_pi()
3337 if (ret) in futex_wait_requeue_pi()
3346 ret = -EINVAL; in futex_wait_requeue_pi()
3354 ret = handle_early_requeue_pi_wakeup(hb, &q, &key2, to); in futex_wait_requeue_pi()
3356 if (ret) in futex_wait_requeue_pi()
3376 ret = fixup_pi_state_owner(uaddr2, &q, current); in futex_wait_requeue_pi()
3377 if (ret && rt_mutex_owner(&q.pi_state->pi_mutex) == current) { in futex_wait_requeue_pi()
3398 ret = rt_mutex_wait_proxy_lock(pi_mutex, to, &rt_waiter); in futex_wait_requeue_pi()
3401 if (ret && !rt_mutex_cleanup_proxy_lock(pi_mutex, &rt_waiter)) in futex_wait_requeue_pi()
3402 ret = 0; in futex_wait_requeue_pi()
3409 res = fixup_owner(uaddr2, &q, !ret); in futex_wait_requeue_pi()
3415 ret = (res < 0) ? res : 0; in futex_wait_requeue_pi()
3422 if (ret && rt_mutex_owner(&q.pi_state->pi_mutex) == current) { in futex_wait_requeue_pi()
3436 if (ret == -EINTR) { in futex_wait_requeue_pi()
3444 ret = -EWOULDBLOCK; in futex_wait_requeue_pi()
3457 return ret; in futex_wait_requeue_pi()
3507 unsigned long ret; in SYSCALL_DEFINE3() local
3515 ret = -ESRCH; in SYSCALL_DEFINE3()
3524 ret = -EPERM; in SYSCALL_DEFINE3()
3538 return ret; in SYSCALL_DEFINE3()
4068 unsigned long ret; in COMPAT_SYSCALL_DEFINE3() local
4076 ret = -ESRCH; in COMPAT_SYSCALL_DEFINE3()
4085 ret = -EPERM; in COMPAT_SYSCALL_DEFINE3()
4099 return ret; in COMPAT_SYSCALL_DEFINE3()