Skip to content

Commit

Permalink
pty: make ptmx file ops read-only after init
Browse files Browse the repository at this point in the history
The ptmx_fops structure is only changed during init, so mark it as such.

Signed-off-by: Kees Cook <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
  • Loading branch information
kees authored and gregkh committed Sep 15, 2016
1 parent a727b02 commit d2ec3f7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/tty/pty.c
Original file line number Diff line number Diff line change
Expand Up @@ -800,7 +800,7 @@ static int ptmx_open(struct inode *inode, struct file *filp)
return retval;
}

static struct file_operations ptmx_fops;
static struct file_operations ptmx_fops __ro_after_init;

static void __init unix98_pty_init(void)
{
Expand Down

0 comments on commit d2ec3f7

Please sign in to comment.