Showing error 1394

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/kprobes.c
Line in file: 405
Project: Linux Kernel
Project version: 2.6.28
Tools: Stanse (1.2)
Entered: 2012-05-21 20:30:05 UTC


Source:

 375        }
 376        return;
 377}
 378
 379void __kprobes recycle_rp_inst(struct kretprobe_instance *ri,
 380                                struct hlist_head *head)
 381{
 382        struct kretprobe *rp = ri->rp;
 383
 384        /* remove rp inst off the rprobe_inst_table */
 385        hlist_del(&ri->hlist);
 386        INIT_HLIST_NODE(&ri->hlist);
 387        if (likely(rp)) {
 388                spin_lock(&rp->lock);
 389                hlist_add_head(&ri->hlist, &rp->free_instances);
 390                spin_unlock(&rp->lock);
 391        } else
 392                /* Unregistering */
 393                hlist_add_head(&ri->hlist, head);
 394}
 395
 396void kretprobe_hash_lock(struct task_struct *tsk,
 397                         struct hlist_head **head, unsigned long *flags)
 398{
 399        unsigned long hash = hash_ptr(tsk, KPROBE_HASH_BITS);
 400        spinlock_t *hlist_lock;
 401
 402        *head = &kretprobe_inst_table[hash];
 403        hlist_lock = kretprobe_table_lock_ptr(hash);
 404        spin_lock_irqsave(hlist_lock, *flags);
 405}
 406
 407static void kretprobe_table_lock(unsigned long hash, unsigned long *flags)
 408{
 409        spinlock_t *hlist_lock = kretprobe_table_lock_ptr(hash);
 410        spin_lock_irqsave(hlist_lock, *flags);
 411}
 412
 413void kretprobe_hash_unlock(struct task_struct *tsk, unsigned long *flags)
 414{
 415        unsigned long hash = hash_ptr(tsk, KPROBE_HASH_BITS);
Show full sources