aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/tty/vt/vc_screen.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/tty/vt/vc_screen.c')
-rw-r--r--drivers/tty/vt/vc_screen.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/tty/vt/vc_screen.c b/drivers/tty/vt/vc_screen.c
index eab3a1ff99e..a672ed192d3 100644
--- a/drivers/tty/vt/vc_screen.c
+++ b/drivers/tty/vt/vc_screen.c
@@ -202,7 +202,7 @@ vcs_read(struct file *file, char __user *buf, size_t count, loff_t *ppos)
202 /* Select the proper current console and verify 202 /* Select the proper current console and verify
203 * sanity of the situation under the console lock. 203 * sanity of the situation under the console lock.
204 */ 204 */
205 acquire_console_sem(); 205 console_lock();
206 206
207 attr = (currcons & 128); 207 attr = (currcons & 128);
208 currcons = (currcons & 127); 208 currcons = (currcons & 127);
@@ -336,9 +336,9 @@ vcs_read(struct file *file, char __user *buf, size_t count, loff_t *ppos)
336 * the pagefault handling code may want to call printk(). 336 * the pagefault handling code may want to call printk().
337 */ 337 */
338 338
339 release_console_sem(); 339 console_unlock();
340 ret = copy_to_user(buf, con_buf_start, orig_count); 340 ret = copy_to_user(buf, con_buf_start, orig_count);
341 acquire_console_sem(); 341 console_lock();
342 342
343 if (ret) { 343 if (ret) {
344 read += (orig_count - ret); 344 read += (orig_count - ret);
@@ -354,7 +354,7 @@ vcs_read(struct file *file, char __user *buf, size_t count, loff_t *ppos)
354 if (read) 354 if (read)
355 ret = read; 355 ret = read;
356unlock_out: 356unlock_out:
357 release_console_sem(); 357 console_unlock();
358 mutex_unlock(&con_buf_mtx); 358 mutex_unlock(&con_buf_mtx);
359 return ret; 359 return ret;
360} 360}
@@ -379,7 +379,7 @@ vcs_write(struct file *file, const char __user *buf, size_t count, loff_t *ppos)
379 /* Select the proper current console and verify 379 /* Select the proper current console and verify
380 * sanity of the situation under the console lock. 380 * sanity of the situation under the console lock.
381 */ 381 */
382 acquire_console_sem(); 382 console_lock();
383 383
384 attr = (currcons & 128); 384 attr = (currcons & 128);
385 currcons = (currcons & 127); 385 currcons = (currcons & 127);
@@ -414,9 +414,9 @@ vcs_write(struct file *file, const char __user *buf, size_t count, loff_t *ppos)
414 /* Temporarily drop the console lock so that we can read 414 /* Temporarily drop the console lock so that we can read
415 * in the write data from userspace safely. 415 * in the write data from userspace safely.
416 */ 416 */
417 release_console_sem(); 417 console_unlock();
418 ret = copy_from_user(con_buf, buf, this_round); 418 ret = copy_from_user(con_buf, buf, this_round);
419 acquire_console_sem(); 419 console_lock();
420 420
421 if (ret) { 421 if (ret) {
422 this_round -= ret; 422 this_round -= ret;
@@ -542,7 +542,7 @@ vcs_write(struct file *file, const char __user *buf, size_t count, loff_t *ppos)
542 vcs_scr_updated(vc); 542 vcs_scr_updated(vc);
543 543
544unlock_out: 544unlock_out:
545 release_console_sem(); 545 console_unlock();
546 546
547 mutex_unlock(&con_buf_mtx); 547 mutex_unlock(&con_buf_mtx);
548 548