Showing error 1181

User: Jiri Slaby
Error type: Double Unlock
Error type description: Some lock is unlocked twice unintentionally in a sequence
File location: kernel/futex.c
Line in file: 804
Project: Linux Kernel
Project version: 2.6.28
Tools: Stanse (1.2)
Entered: 2012-04-30 10:52:00 UTC


Source:

 774              int nr_wake, int nr_wake2, int op)
 775{
 776        union futex_key key1, key2;
 777        struct futex_hash_bucket *hb1, *hb2;
 778        struct plist_head *head;
 779        struct futex_q *this, *next;
 780        int ret, op_ret, attempt = 0;
 781
 782retryfull:
 783        futex_lock_mm(fshared);
 784
 785        ret = get_futex_key(uaddr1, fshared, &key1);
 786        if (unlikely(ret != 0))
 787                goto out;
 788        ret = get_futex_key(uaddr2, fshared, &key2);
 789        if (unlikely(ret != 0))
 790                goto out;
 791
 792        hb1 = hash_futex(&key1);
 793        hb2 = hash_futex(&key2);
 794
 795retry:
 796        double_lock_hb(hb1, hb2);
 797
 798        op_ret = futex_atomic_op_inuser(op, uaddr2);
 799        if (unlikely(op_ret < 0)) {
 800                u32 dummy;
 801
 802                spin_unlock(&hb1->lock);
 803                if (hb1 != hb2)
 804                        spin_unlock(&hb2->lock);
 805
 806#ifndef CONFIG_MMU
 807                /*
 808                 * we don't get EFAULT from MMU faults if we don't have an MMU,
 809                 * but we might get them from range checking
 810                 */
 811                ret = op_ret;
 812                goto out;
 813#endif
 814
Show full sources