Showing error 1035

User: Jiri Slaby
Error type: Leaving function in locked state
Error type description: Some lock is not unlocked on all paths of a function, so it is leaked
File location: kernel/futex.c
Line in file: 878
Project: Linux Kernel
Project version: 2.6.28
Tools: Undetermined 1
Entered: 2012-03-04 17:07:06 UTC


Source:

 848        head = &hb1->chain;
 849
 850        plist_for_each_entry_safe(this, next, head, list) {
 851                if (match_futex (&this->key, &key1)) {
 852                        wake_futex(this);
 853                        if (++ret >= nr_wake)
 854                                break;
 855                }
 856        }
 857
 858        if (op_ret > 0) {
 859                head = &hb2->chain;
 860
 861                op_ret = 0;
 862                plist_for_each_entry_safe(this, next, head, list) {
 863                        if (match_futex (&this->key, &key2)) {
 864                                wake_futex(this);
 865                                if (++op_ret >= nr_wake2)
 866                                        break;
 867                        }
 868                }
 869                ret += op_ret;
 870        }
 871
 872        spin_unlock(&hb1->lock);
 873        if (hb1 != hb2)
 874                spin_unlock(&hb2->lock);
 875out:
 876        futex_unlock_mm(fshared);
 877
 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{
Show full sources