All device permissions are controlled via device cgroup now. We don't need this ioctl() anymore.
Signed-off-by: Andrey Ryabinin <[email protected]> --- include/uapi/linux/vzcalluser.h | 2 +- kernel/ve/vecalls.c | 37 ------------------------------------- 2 files changed, 1 insertion(+), 38 deletions(-) diff --git a/include/uapi/linux/vzcalluser.h b/include/uapi/linux/vzcalluser.h index 2b340cf..85761c7 100644 --- a/include/uapi/linux/vzcalluser.h +++ b/include/uapi/linux/vzcalluser.h @@ -161,7 +161,7 @@ struct vzctl_cpustatctl { #define VZCTLTYPE '.' #define VZCTL_OLD_ENV_CREATE _IOW(VZCTLTYPE, 0, struct vzctl_old_env_create) #define VZCTL_MARK_ENV_TO_DOWN _IOW(VZCTLTYPE, 1, struct vzctl_mark_env_to_down) -#define VZCTL_SETDEVPERMS _IOW(VZCTLTYPE, 2, struct vzctl_setdevperms) +#define VZCTL_SETDEVPERMS _IOW(VZCTLTYPE, 2, struct vzctl_setdevperms) /* DEPRECATED */ #define VZCTL_ENV_CREATE_CID _IOW(VZCTLTYPE, 4, struct vzctl_env_create_cid) #define VZCTL_ENV_CREATE _IOW(VZCTLTYPE, 5, struct vzctl_env_create) #define VZCTL_GET_CPU_STAT _IOW(VZCTLTYPE, 6, struct vzctl_cpustatctl) diff --git a/kernel/ve/vecalls.c b/kernel/ve/vecalls.c index 4742576..5ce3e29 100644 --- a/kernel/ve/vecalls.c +++ b/kernel/ve/vecalls.c @@ -97,29 +97,6 @@ out_put_ve: return retval; } -static int real_setdevperms(envid_t veid, unsigned type, - dev_t dev, unsigned mask) -{ - struct ve_struct *ve; - int err; - - if (!capable_setveid() || veid == 0) - return -EPERM; - - if ((ve = get_ve_by_id(veid)) == NULL) - return -ESRCH; - - down_read(&ve->op_sem); - - err = -EAGAIN; - if (ve->is_running) - err = devcgroup_set_perms_ve(ve, type, dev, mask); - - up_read(&ve->op_sem); - put_ve(ve); - return err; -} - /********************************************************************** ********************************************************************** * @@ -604,20 +581,6 @@ int vzcalls_ioctl(struct file *file, unsigned int cmd, unsigned long arg) err = 0; } break; - case VZCTL_SETDEVPERMS: { - /* Device type was mistakenly declared as dev_t - * in the old user-kernel interface. - * That's wrong, dev_t is a kernel internal type. - * I use `unsigned' not having anything better in mind. - * 2001/08/11 SAW */ - struct vzctl_setdevperms s; - err = -EFAULT; - if (copy_from_user(&s, (void __user *)arg, sizeof(s))) - break; - err = real_setdevperms(s.veid, s.type, - new_decode_dev(s.dev), s.mask); - } - break; #ifdef CONFIG_INET case VZCTL_VE_NETDEV: { struct vzctl_ve_netdev d; -- 2.7.3 _______________________________________________ Devel mailing list [email protected] https://lists.openvz.org/mailman/listinfo/devel
