From: Jiri Slaby Signed-off-by: Jiri Slaby Signed-off-by: Andrew Morton --- drivers/char/tty_io.c | 8 +++++--- drivers/char/vt.c | 4 ++-- 2 files changed, 7 insertions(+), 5 deletions(-) diff -puN drivers/char/tty_io.c~tty-bkl-pushdown-fix drivers/char/tty_io.c --- a/drivers/char/tty_io.c~tty-bkl-pushdown-fix +++ a/drivers/char/tty_io.c @@ -1246,8 +1246,8 @@ static unsigned int hung_up_tty_poll(str return POLLIN | POLLOUT | POLLERR | POLLHUP | POLLRDNORM | POLLWRNORM; } -static long hung_up_tty_ioctl(struct inode *inode, struct file *file, - unsigned int cmd, unsigned long arg) +static long hung_up_tty_ioctl(struct file *file, unsigned int cmd, + unsigned long arg) { return cmd == TIOCSPGRP ? -ENOTTY : -EIO; } @@ -1301,7 +1301,7 @@ static const struct file_operations hung .read = hung_up_tty_read, .write = hung_up_tty_write, .poll = hung_up_tty_poll, - .ioctl = hung_up_tty_ioctl, + .unlocked_ioctl = hung_up_tty_ioctl, .compat_ioctl = hung_up_tty_compat_ioctl, .release = tty_release, }; @@ -3254,6 +3254,8 @@ static int tiocsetd(struct tty_struct *t lock_kernel(); ret = tty_set_ldisc(tty, ldisc); unlock_kernel(); + + return ret; } /** diff -puN drivers/char/vt.c~tty-bkl-pushdown-fix drivers/char/vt.c --- a/drivers/char/vt.c~tty-bkl-pushdown-fix +++ a/drivers/char/vt.c @@ -2562,7 +2562,7 @@ int tioclinux(struct tty_struct *tty, un ret = sel_loadlut(p); break; case TIOCL_GETSHIFTSTATE: - + /* * Make it possible to react to Shift+Mousebutton. * Note that 'shift_state' is an undocumented @@ -3832,7 +3832,7 @@ static int con_font_get(struct vc_data * goto out; c = (font.width+7)/8 * 32 * font.charcount; - + if (op->data && font.charcount > op->charcount) rc = -ENOSPC; if (!(op->flags & KD_FONT_FLAG_OLD)) { _