Merge tag 'cxl-for-6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/cxl/cxl
[linux-2.6-microblaze.git] / drivers / tty / tty_ioctl.c
index 4b49930..85de90e 100644 (file)
@@ -844,7 +844,7 @@ int tty_mode_ioctl(struct tty_struct *tty, unsigned int cmd, unsigned long arg)
                        ret = -EFAULT;
                return ret;
        case TIOCSLCKTRMIOS:
-               if (!capable(CAP_SYS_ADMIN))
+               if (!checkpoint_restore_ns_capable(&init_user_ns))
                        return -EPERM;
                copy_termios_locked(real_tty, &kterm);
                if (user_termios_to_kernel_termios(&kterm,
@@ -861,7 +861,7 @@ int tty_mode_ioctl(struct tty_struct *tty, unsigned int cmd, unsigned long arg)
                        ret = -EFAULT;
                return ret;
        case TIOCSLCKTRMIOS:
-               if (!capable(CAP_SYS_ADMIN))
+               if (!checkpoint_restore_ns_capable(&init_user_ns))
                        return -EPERM;
                copy_termios_locked(real_tty, &kterm);
                if (user_termios_to_kernel_termios_1(&kterm,