diff options
Diffstat (limited to 'drivers/tty/vt/vt_ioctl.c')
-rw-r--r-- | drivers/tty/vt/vt_ioctl.c | 25 |
1 files changed, 5 insertions, 20 deletions
diff --git a/drivers/tty/vt/vt_ioctl.c b/drivers/tty/vt/vt_ioctl.c index ede2ef18d2fb..64618547be11 100644 --- a/drivers/tty/vt/vt_ioctl.c +++ b/drivers/tty/vt/vt_ioctl.c | |||
@@ -910,7 +910,9 @@ int vt_ioctl(struct tty_struct *tty, | |||
910 | ret = con_font_op(vc_cons[fg_console].d, &op); | 910 | ret = con_font_op(vc_cons[fg_console].d, &op); |
911 | if (ret) | 911 | if (ret) |
912 | break; | 912 | break; |
913 | console_lock(); | ||
913 | con_set_default_unimap(vc_cons[fg_console].d); | 914 | con_set_default_unimap(vc_cons[fg_console].d); |
915 | console_unlock(); | ||
914 | break; | 916 | break; |
915 | } | 917 | } |
916 | #endif | 918 | #endif |
@@ -934,33 +936,23 @@ int vt_ioctl(struct tty_struct *tty, | |||
934 | case PIO_SCRNMAP: | 936 | case PIO_SCRNMAP: |
935 | if (!perm) | 937 | if (!perm) |
936 | ret = -EPERM; | 938 | ret = -EPERM; |
937 | else { | 939 | else |
938 | tty_lock(); | ||
939 | ret = con_set_trans_old(up); | 940 | ret = con_set_trans_old(up); |
940 | tty_unlock(); | ||
941 | } | ||
942 | break; | 941 | break; |
943 | 942 | ||
944 | case GIO_SCRNMAP: | 943 | case GIO_SCRNMAP: |
945 | tty_lock(); | ||
946 | ret = con_get_trans_old(up); | 944 | ret = con_get_trans_old(up); |
947 | tty_unlock(); | ||
948 | break; | 945 | break; |
949 | 946 | ||
950 | case PIO_UNISCRNMAP: | 947 | case PIO_UNISCRNMAP: |
951 | if (!perm) | 948 | if (!perm) |
952 | ret = -EPERM; | 949 | ret = -EPERM; |
953 | else { | 950 | else |
954 | tty_lock(); | ||
955 | ret = con_set_trans_new(up); | 951 | ret = con_set_trans_new(up); |
956 | tty_unlock(); | ||
957 | } | ||
958 | break; | 952 | break; |
959 | 953 | ||
960 | case GIO_UNISCRNMAP: | 954 | case GIO_UNISCRNMAP: |
961 | tty_lock(); | ||
962 | ret = con_get_trans_new(up); | 955 | ret = con_get_trans_new(up); |
963 | tty_unlock(); | ||
964 | break; | 956 | break; |
965 | 957 | ||
966 | case PIO_UNIMAPCLR: | 958 | case PIO_UNIMAPCLR: |
@@ -970,19 +962,14 @@ int vt_ioctl(struct tty_struct *tty, | |||
970 | ret = copy_from_user(&ui, up, sizeof(struct unimapinit)); | 962 | ret = copy_from_user(&ui, up, sizeof(struct unimapinit)); |
971 | if (ret) | 963 | if (ret) |
972 | ret = -EFAULT; | 964 | ret = -EFAULT; |
973 | else { | 965 | else |
974 | tty_lock(); | ||
975 | con_clear_unimap(vc, &ui); | 966 | con_clear_unimap(vc, &ui); |
976 | tty_unlock(); | ||
977 | } | ||
978 | break; | 967 | break; |
979 | } | 968 | } |
980 | 969 | ||
981 | case PIO_UNIMAP: | 970 | case PIO_UNIMAP: |
982 | case GIO_UNIMAP: | 971 | case GIO_UNIMAP: |
983 | tty_lock(); | ||
984 | ret = do_unimap_ioctl(cmd, up, perm, vc); | 972 | ret = do_unimap_ioctl(cmd, up, perm, vc); |
985 | tty_unlock(); | ||
986 | break; | 973 | break; |
987 | 974 | ||
988 | case VT_LOCKSWITCH: | 975 | case VT_LOCKSWITCH: |
@@ -1196,9 +1183,7 @@ long vt_compat_ioctl(struct tty_struct *tty, | |||
1196 | 1183 | ||
1197 | case PIO_UNIMAP: | 1184 | case PIO_UNIMAP: |
1198 | case GIO_UNIMAP: | 1185 | case GIO_UNIMAP: |
1199 | tty_lock(); | ||
1200 | ret = compat_unimap_ioctl(cmd, up, perm, vc); | 1186 | ret = compat_unimap_ioctl(cmd, up, perm, vc); |
1201 | tty_unlock(); | ||
1202 | break; | 1187 | break; |
1203 | 1188 | ||
1204 | /* | 1189 | /* |