Showing error 1560

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


Source:

 83
 84} /* end key_proc_init() */
 85
 86__initcall(key_proc_init);
 87
 88/*****************************************************************************/
 89/*
 90 * implement "/proc/keys" to provides a list of the keys on the system
 91 */
 92#ifdef CONFIG_KEYS_DEBUG_PROC_KEYS
 93
 94static int proc_keys_open(struct inode *inode, struct file *file)
 95{
 96        return seq_open(file, &proc_keys_ops);
 97
 98}
 99
100static void *proc_keys_start(struct seq_file *p, loff_t *_pos)
101{
102        struct rb_node *_p;
103        loff_t pos = *_pos;
104
105        spin_lock(&key_serial_lock);
106
107        _p = rb_first(&key_serial_tree);
108        while (pos > 0 && _p) {
109                pos--;
110                _p = rb_next(_p);
111        }
112
113        return _p;
114
115}
116
117static void *proc_keys_next(struct seq_file *p, void *v, loff_t *_pos)
118{
119        (*_pos)++;
120        return rb_next((struct rb_node *) v);
121
122}
123
Show full sources