diff options
Diffstat (limited to 'drivers/char/vt.c')
-rw-r--r-- | drivers/char/vt.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/drivers/char/vt.c b/drivers/char/vt.c index 75ff0286e1ad..a8239dac994f 100644 --- a/drivers/char/vt.c +++ b/drivers/char/vt.c | |||
@@ -152,7 +152,7 @@ static void gotoxy(struct vc_data *vc, int new_x, int new_y); | |||
152 | static void save_cur(struct vc_data *vc); | 152 | static void save_cur(struct vc_data *vc); |
153 | static void reset_terminal(struct vc_data *vc, int do_clear); | 153 | static void reset_terminal(struct vc_data *vc, int do_clear); |
154 | static void con_flush_chars(struct tty_struct *tty); | 154 | static void con_flush_chars(struct tty_struct *tty); |
155 | static void set_vesa_blanking(char __user *p); | 155 | static int set_vesa_blanking(char __user *p); |
156 | static void set_cursor(struct vc_data *vc); | 156 | static void set_cursor(struct vc_data *vc); |
157 | static void hide_cursor(struct vc_data *vc); | 157 | static void hide_cursor(struct vc_data *vc); |
158 | static void console_callback(struct work_struct *ignored); | 158 | static void console_callback(struct work_struct *ignored); |
@@ -2369,7 +2369,7 @@ int tioclinux(struct tty_struct *tty, unsigned long arg) | |||
2369 | ret = __put_user(data, p); | 2369 | ret = __put_user(data, p); |
2370 | break; | 2370 | break; |
2371 | case TIOCL_SETVESABLANK: | 2371 | case TIOCL_SETVESABLANK: |
2372 | set_vesa_blanking(p); | 2372 | ret = set_vesa_blanking(p); |
2373 | break; | 2373 | break; |
2374 | case TIOCL_GETKMSGREDIRECT: | 2374 | case TIOCL_GETKMSGREDIRECT: |
2375 | data = kmsg_redirect; | 2375 | data = kmsg_redirect; |
@@ -3313,11 +3313,15 @@ postcore_initcall(vtconsole_class_init); | |||
3313 | * Screen blanking | 3313 | * Screen blanking |
3314 | */ | 3314 | */ |
3315 | 3315 | ||
3316 | static void set_vesa_blanking(char __user *p) | 3316 | static int set_vesa_blanking(char __user *p) |
3317 | { | 3317 | { |
3318 | unsigned int mode; | 3318 | unsigned int mode; |
3319 | get_user(mode, p + 1); | 3319 | |
3320 | vesa_blank_mode = (mode < 4) ? mode : 0; | 3320 | if (get_user(mode, p + 1)) |
3321 | return -EFAULT; | ||
3322 | |||
3323 | vesa_blank_mode = (mode < 4) ? mode : 0; | ||
3324 | return 0; | ||
3321 | } | 3325 | } |
3322 | 3326 | ||
3323 | void do_blank_screen(int entering_gfx) | 3327 | void do_blank_screen(int entering_gfx) |