All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] tty: ldisc: Fix misuse of proc_dointvec "ldisc_autoload"
@ 2019-06-25  3:08 Eiichi Tsukata
  2019-06-25  3:08 ` [PATCH 2/2] net/ipv6: Fix misuse of proc_dointvec "skip_notify_on_dev_down" Eiichi Tsukata
  2019-06-25  3:32 ` [PATCH 1/2] tty: ldisc: Fix misuse of proc_dointvec "ldisc_autoload" Greg KH
  0 siblings, 2 replies; 5+ messages in thread
From: Eiichi Tsukata @ 2019-06-25  3:08 UTC (permalink / raw)
  To: gregkh, jslaby, davem, kuznet, yoshfuji, linux-kernel, netdev
  Cc: Eiichi Tsukata

/proc/sys/dev/tty/ldisc_autoload assumes given value to be 0 or 1. Use
proc_dointvec_minmax instead of proc_dointvec.

Fixes: 7c0cca7c847e "(tty: ldisc: add sysctl to prevent autoloading of ldiscs)"
Signed-off-by: Eiichi Tsukata <devel@etsukata.com>
---
 drivers/tty/tty_ldisc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/tty/tty_ldisc.c b/drivers/tty/tty_ldisc.c
index e38f104db174..a8ea7a35c94e 100644
--- a/drivers/tty/tty_ldisc.c
+++ b/drivers/tty/tty_ldisc.c
@@ -863,7 +863,7 @@ static struct ctl_table tty_table[] = {
 		.data		= &tty_ldisc_autoload,
 		.maxlen		= sizeof(tty_ldisc_autoload),
 		.mode		= 0644,
-		.proc_handler	= proc_dointvec,
+		.proc_handler	= proc_dointvec_minmax,
 		.extra1		= &zero,
 		.extra2		= &one,
 	},
-- 
2.21.0


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2019-06-25 19:59 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-25  3:08 [PATCH 1/2] tty: ldisc: Fix misuse of proc_dointvec "ldisc_autoload" Eiichi Tsukata
2019-06-25  3:08 ` [PATCH 2/2] net/ipv6: Fix misuse of proc_dointvec "skip_notify_on_dev_down" Eiichi Tsukata
2019-06-25 19:59   ` David Miller
2019-06-25  3:32 ` [PATCH 1/2] tty: ldisc: Fix misuse of proc_dointvec "ldisc_autoload" Greg KH
2019-06-25  4:40   ` Eiichi Tsukata

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.