release_console_sem();
int tioclinux(struct tty_struct *tty, unsigned long arg){	char type, data;	char __user *p = (char __user *)arg;	int lines;	int ret;	if (tty->driver->type != TTY_DRIVER_TYPE_CONSOLE)		return -EINVAL;	if (current->signal->tty != tty && !capable(CAP_SYS_ADMIN))		return -EPERM;	if (get_user(type, p))		return -EFAULT;	ret = 0;	switch (type)	{		case TIOCL_SETSEL:			acquire_console_sem();			ret = set_selection((struct tiocl_selection __user *)(p+1), tty);			release_console_sem();			break;		case TIOCL_PASTESEL:			ret = paste_selection(tty);			break;		case TIOCL_UNBLANKSCREEN:			unblank_screen();			break;		case TIOCL_SELLOADLUT:			ret = sel_loadlut(p);			break;		case TIOCL_GETSHIFTSTATE:				/*	 * Make it possible to react to Shift+Mousebutton.	 * Note that 'shift_state' is an undocumented	 * kernel-internal variable; programs not closely	 * related to the kernel should not use this.	 */	 		data = shift_state;			ret = __put_user(data, p);			break;		case TIOCL_GETMOUSEREPORTING:			data = mouse_reporting();			ret = __put_user(data, p);			break;		case TIOCL_SETVESABLANK:			set_vesa_blanking(p);			break;		case TIOCL_SETKMSGREDIRECT:			if (!capable(CAP_SYS_ADMIN)) {				ret = -EPERM;			} else {				if (get_user(data, p+1))					ret = -EFAULT;				else					kmsg_redirect = data;			}			break;		case TIOCL_GETFGCONSOLE:			ret = fg_console;			break;		case TIOCL_SCROLLCONSOLE:			if (get_user(lines, (s32 __user *)(p+4))) {				ret = -EFAULT;			} else {				scrollfront(vc_cons[fg_console].d, lines);				ret = 0;			}			break;		case TIOCL_BLANKSCREEN:	/* until explicitly unblanked, not only poked */			ignore_poke = 1;			do_blank_screen(0);			break;		case TIOCL_BLANKEDSCREEN:			ret = console_blanked;			break;		default:			ret = -EINVAL;			break;	}	return ret;}