diff options
author | Kees Cook <keescook@chromium.org> | 2016-09-09 01:35:59 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-09-15 13:47:03 +0300 |
commit | d2ec3f77de8e67b7a3dab3ec827467e0fd797c86 (patch) | |
tree | 42575ee9f06a4d099398699b521edbd2ad125e93 /drivers/tty/pty.c | |
parent | a727b025f43d7952c0697562f5cecda9f42758aa (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/pty.c')
-rw-r--r-- | drivers/tty/pty.c | 2 |
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) { |