Ignore:
Timestamp:
Apr 16, 2017, 3:07:01 PM (2 months ago)
Author:
brainslayer
Message:

update

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/linux/universal/linux-3.18/kernel/futex.c

    r30256 r31869  
    25682568        struct hrtimer_sleeper timeout, *to = NULL;
    25692569        struct rt_mutex_waiter rt_waiter;
    2570         struct rt_mutex *pi_mutex = NULL;
    25712570        struct futex_hash_bucket *hb;
    25722571        union futex_key key2 = FUTEX_KEY_INIT;
     
    26522651                        spin_lock(q.lock_ptr);
    26532652                        ret = fixup_pi_state_owner(uaddr2, &q, current);
     2653                        if (ret && rt_mutex_owner(&q.pi_state->pi_mutex) == current)
     2654                                rt_mutex_unlock(&q.pi_state->pi_mutex);
    26542655                        /*
    26552656                         * Drop the reference to the pi state which
     
    26602661                }
    26612662        } else {
     2663                struct rt_mutex *pi_mutex;
     2664
    26622665                /*
    26632666                 * We have been woken up by futex_unlock_pi(), a timeout, or a
     
    26832686                        ret = (res < 0) ? res : 0;
    26842687
     2688                /*
     2689                 * If fixup_pi_state_owner() faulted and was unable to handle
     2690                 * the fault, unlock the rt_mutex and return the fault to
     2691                 * userspace.
     2692                 */
     2693                if (ret && rt_mutex_owner(pi_mutex) == current)
     2694                        rt_mutex_unlock(pi_mutex);
     2695
    26852696                /* Unqueue and drop the lock. */
    26862697                unqueue_me_pi(&q);
    26872698        }
    26882699
    2689         /*
    2690          * If fixup_pi_state_owner() faulted and was unable to handle the
    2691          * fault, unlock the rt_mutex and return the fault to userspace.
    2692          */
    2693         if (ret == -EFAULT) {
    2694                 if (pi_mutex && rt_mutex_owner(pi_mutex) == current)
    2695                         rt_mutex_unlock(pi_mutex);
    2696         } else if (ret == -EINTR) {
     2700        if (ret == -EINTR) {
    26972701                /*
    26982702                 * We've already been requeued, but cannot restart by calling
Note: See TracChangeset for help on using the changeset viewer.