Showing error 899

User: Jiri Slaby
Error type: Double Lock
Error type description: Some lock is locked twice unintentionally in a sequence
File location: kernel/futex.c
Line in file: 908
Project: Linux Kernel
Project version: 2.6.28
Tools: Undetermined 1
Entered: 2012-02-27 21:22:42 UTC


Source:

 878        return ret;
 879}
 880
 881/*
 882 * Requeue all waiters hashed on one physical page to another
 883 * physical page.
 884 */
 885static int futex_requeue(u32 __user *uaddr1, struct rw_semaphore *fshared,
 886                         u32 __user *uaddr2,
 887                         int nr_wake, int nr_requeue, u32 *cmpval)
 888{
 889        union futex_key key1, key2;
 890        struct futex_hash_bucket *hb1, *hb2;
 891        struct plist_head *head1;
 892        struct futex_q *this, *next;
 893        int ret, drop_count = 0;
 894
 895 retry:
 896        futex_lock_mm(fshared);
 897
 898        ret = get_futex_key(uaddr1, fshared, &key1);
 899        if (unlikely(ret != 0))
 900                goto out;
 901        ret = get_futex_key(uaddr2, fshared, &key2);
 902        if (unlikely(ret != 0))
 903                goto out;
 904
 905        hb1 = hash_futex(&key1);
 906        hb2 = hash_futex(&key2);
 907
 908        double_lock_hb(hb1, hb2);
 909
 910        if (likely(cmpval != NULL)) {
 911                u32 curval;
 912
 913                ret = get_futex_value_locked(&curval, uaddr1);
 914
 915                if (unlikely(ret)) {
 916                        spin_unlock(&hb1->lock);
 917                        if (hb1 != hb2)
 918                                spin_unlock(&hb2->lock);
Show full sources