Showing error 1516

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


Source:

3624};
3625
3626#ifdef CONFIG_PROC_FS
3627static int pfkey_seq_show(struct seq_file *f, void *v)
3628{
3629        struct sock *s;
3630
3631        s = (struct sock *)v;
3632        if (v == SEQ_START_TOKEN)
3633                seq_printf(f ,"sk       RefCnt Rmem   Wmem   User   Inode\n");
3634        else
3635                seq_printf(f ,"%p %-6d %-6u %-6u %-6u %-6lu\n",
3636                               s,
3637                               atomic_read(&s->sk_refcnt),
3638                               atomic_read(&s->sk_rmem_alloc),
3639                               atomic_read(&s->sk_wmem_alloc),
3640                               sock_i_uid(s),
3641                               sock_i_ino(s)
3642                               );
3643        return 0;
3644}
3645
3646static void *pfkey_seq_start(struct seq_file *f, loff_t *ppos)
3647{
3648        struct sock *s;
3649        struct hlist_node *node;
3650        loff_t pos = *ppos;
3651
3652        read_lock(&pfkey_table_lock);
3653        if (pos == 0)
3654                return SEQ_START_TOKEN;
3655
3656        sk_for_each(s, node, &pfkey_table)
3657                if (pos-- == 1)
3658                        return s;
3659
3660        return NULL;
3661}
3662
3663static void *pfkey_seq_next(struct seq_file *f, void *v, loff_t *ppos)
3664{
Show full sources