diff options
Diffstat (limited to 'fs/proc/proc_tty.c')
-rw-r--r-- | fs/proc/proc_tty.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/proc/proc_tty.c b/fs/proc/proc_tty.c index c1bbfbeb035e..b3a473b0a191 100644 --- a/fs/proc/proc_tty.c +++ b/fs/proc/proc_tty.c | |||
@@ -108,6 +108,8 @@ static void *t_start(struct seq_file *m, loff_t *pos) | |||
108 | { | 108 | { |
109 | struct list_head *p; | 109 | struct list_head *p; |
110 | loff_t l = *pos; | 110 | loff_t l = *pos; |
111 | |||
112 | mutex_lock(&tty_mutex); | ||
111 | list_for_each(p, &tty_drivers) | 113 | list_for_each(p, &tty_drivers) |
112 | if (!l--) | 114 | if (!l--) |
113 | return list_entry(p, struct tty_driver, tty_drivers); | 115 | return list_entry(p, struct tty_driver, tty_drivers); |
@@ -124,6 +126,7 @@ static void *t_next(struct seq_file *m, void *v, loff_t *pos) | |||
124 | 126 | ||
125 | static void t_stop(struct seq_file *m, void *v) | 127 | static void t_stop(struct seq_file *m, void *v) |
126 | { | 128 | { |
129 | mutex_unlock(&tty_mutex); | ||
127 | } | 130 | } |
128 | 131 | ||
129 | static struct seq_operations tty_drivers_op = { | 132 | static struct seq_operations tty_drivers_op = { |