summaryrefslogtreecommitdiff
path: root/drivers/tty
diff options
context:
space:
mode:
authorKees Cook <keescook@chromium.org>2016-09-08 15:35:59 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-09-15 12:47:03 +0200
commitd2ec3f77de8e67b7a3dab3ec827467e0fd797c86 (patch)
tree42575ee9f06a4d099398699b521edbd2ad125e93 /drivers/tty
parenta727b025f43d7952c0697562f5cecda9f42758aa (diff)
pty: make ptmx file ops read-only after init
The ptmx_fops structure is only changed during init, so mark it as such. Signed-off-by: Kees Cook <keescook@chromium.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty')
-rw-r--r--drivers/tty/pty.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/tty/pty.c b/drivers/tty/pty.c
index 51e0d32883ba..a23fa5ed1d67 100644
--- a/drivers/tty/pty.c
+++ b/drivers/tty/pty.c
@@ -800,7 +800,7 @@ out_free_file:
return retval;
}
-static struct file_operations ptmx_fops;
+static struct file_operations ptmx_fops __ro_after_init;
static void __init unix98_pty_init(void)
{