lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Mon,  2 Mar 2020 11:49:54 +0100
From:   Tobias Klauser <tklauser@...tanz.ch>
To:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Jiri Slaby <jslaby@...e.com>
Cc:     linux-kernel@...r.kernel.org
Subject: [PATCH 2/2] tty: define and set show_fdinfo only if procfs is enabled

Follow the pattern used with other *_show_fdinfo functions and only
define and use tty_show_fdinfo if CONFIG_PROC_FS is set.

Signed-off-by: Tobias Klauser <tklauser@...tanz.ch>
---
 drivers/tty/tty_io.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/tty/tty_io.c b/drivers/tty/tty_io.c
index a1453fe10862..4a6b6116aa72 100644
--- a/drivers/tty/tty_io.c
+++ b/drivers/tty/tty_io.c
@@ -467,6 +467,7 @@ static int hung_up_tty_fasync(int fd, struct file *file, int on)
 	return -ENOTTY;
 }
 
+#ifdef CONFIG_PROC_FS
 static void tty_show_fdinfo(struct seq_file *m, struct file *file)
 {
 	struct tty_struct *tty = file_tty(file);
@@ -474,6 +475,7 @@ static void tty_show_fdinfo(struct seq_file *m, struct file *file)
 	if (tty && tty->ops && tty->ops->show_fdinfo)
 		tty->ops->show_fdinfo(tty, m);
 }
+#endif
 
 static const struct file_operations tty_fops = {
 	.llseek		= no_llseek,
@@ -485,7 +487,9 @@ static const struct file_operations tty_fops = {
 	.open		= tty_open,
 	.release	= tty_release,
 	.fasync		= tty_fasync,
+#ifdef CONFIG_PROC_FS
 	.show_fdinfo	= tty_show_fdinfo,
+#endif
 };
 
 static const struct file_operations console_fops = {
-- 
2.25.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ