Showing error 1363

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


Source:

 77                seq_printf(m, "system:/dev/tty\n");
 78                seq_printf(m, "%-20s /dev/%-8s ", "/dev/console", "console");
 79                seq_printf(m, "%3d %7d ", TTYAUX_MAJOR, 1);
 80                seq_printf(m, "system:console\n");
 81#ifdef CONFIG_UNIX98_PTYS
 82                seq_printf(m, "%-20s /dev/%-8s ", "/dev/ptmx", "ptmx");
 83                seq_printf(m, "%3d %7d ", TTYAUX_MAJOR, 2);
 84                seq_printf(m, "system\n");
 85#endif
 86#ifdef CONFIG_VT
 87                seq_printf(m, "%-20s /dev/%-8s ", "/dev/vc/0", "vc/0");
 88                seq_printf(m, "%3d %7d ", TTY_MAJOR, 0);
 89                seq_printf(m, "system:vtmaster\n");
 90#endif
 91        }
 92
 93        while (MAJOR(from) < MAJOR(to)) {
 94                dev_t next = MKDEV(MAJOR(from)+1, 0);
 95                show_tty_range(m, p, from, next - from);
 96                from = next;
 97        }
 98        if (from != to)
 99                show_tty_range(m, p, from, to - from);
100        return 0;
101}
102
103/* iterator */
104static void *t_start(struct seq_file *m, loff_t *pos)
105{
106        mutex_lock(&tty_mutex);
107        return seq_list_start(&tty_drivers, *pos);
108}
109
110static void *t_next(struct seq_file *m, void *v, loff_t *pos)
111{
112        return seq_list_next(v, &tty_drivers, pos);
113}
114
115static void t_stop(struct seq_file *m, void *v)
116{
117        mutex_unlock(&tty_mutex);
Show full sources