--- zzzz-none-000/linux-3.10.107/fs/proc/proc_tty.c 2017-06-27 09:49:32.000000000 +0000 +++ scorpion-7490-727/linux-3.10.107/fs/proc/proc_tty.c 2021-02-04 17:41:59.000000000 +0000 @@ -18,7 +18,7 @@ /* * The /proc/tty directory inodes... */ -static struct proc_dir_entry *proc_tty_ldisc, *proc_tty_driver; +static struct proc_dir_entry *proc_tty_driver; /* * This is the handler for /proc/tty/drivers @@ -143,7 +143,10 @@ void proc_tty_register_driver(struct tty_driver *driver) { struct proc_dir_entry *ent; - + + if (IS_ENABLED(CONFIG_PROC_STRIPPED)) + return; + if (!driver->driver_name || driver->proc_entry || !driver->ops->proc_fops) return; @@ -160,6 +163,9 @@ { struct proc_dir_entry *ent; + if (IS_ENABLED(CONFIG_PROC_STRIPPED)) + return; + ent = driver->proc_entry; if (!ent) return; @@ -174,9 +180,12 @@ */ void __init proc_tty_init(void) { + if (IS_ENABLED(CONFIG_PROC_STRIPPED)) + return; + if (!proc_mkdir("tty", NULL)) return; - proc_tty_ldisc = proc_mkdir("tty/ldisc", NULL); + proc_mkdir("tty/ldisc", NULL); /* Preserved: it's userspace visible */ /* * /proc/tty/driver/serial reveals the exact character counts for * serial links which is just too easy to abuse for inferring