The commit is pushed to "branch-rh7-3.10.0-123.1.2-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git after rh7-3.10.0-123.1.2.vz7.5.24 ------> commit 79fe58e2cb26c691c0bc5b40d2a1c1894af6932d Author: Andrew Vagin <ava...@openvz.org> Date: Mon Jul 6 17:34:33 2015 +0400
ve/tty: call device_destroy_namespace only for containerized drivers Containerized drivers save ve in drvdata, but other drivers can use drvdata for own needs. For example, uart_add_one_port calls tty_port_register_device_attr with non-zero drvdata. https://jira.sw.ru/browse/PSBM-33971 Signed-off-by: Andrew Vagin <ava...@openvz.org> Acked-by: Cyrill Gorcunov <gorcu...@openvz.org> --- drivers/tty/tty_io.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/drivers/tty/tty_io.c b/drivers/tty/tty_io.c index 13f2430..1da7df3 100644 --- a/drivers/tty/tty_io.c +++ b/drivers/tty/tty_io.c @@ -3257,13 +3257,14 @@ EXPORT_SYMBOL_GPL(tty_register_device_attr); void tty_unregister_device(struct tty_driver *driver, unsigned index) { #ifdef CONFIG_VE - device_destroy_namespace(tty_class, - MKDEV(driver->major, driver->minor_start) + index, - driver->ve); -#else - device_destroy(tty_class, - MKDEV(driver->major, driver->minor_start) + index); + if (driver->flags & TTY_DRIVER_CONTAINERIZED) { + device_destroy_namespace(tty_class, + MKDEV(driver->major, driver->minor_start) + index, + driver->ve); + } else #endif + device_destroy(tty_class, + MKDEV(driver->major, driver->minor_start) + index); if (!(driver->flags & TTY_DRIVER_DYNAMIC_ALLOC)) tty_cdev_del(driver, &driver->cdevs[index]); } _______________________________________________ Devel mailing list Devel@openvz.org https://lists.openvz.org/mailman/listinfo/devel