Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit d2ec3f7

Browse files
keesgregkh
authored andcommitted
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 <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent a727b02 commit d2ec3f7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/tty/pty.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -800,7 +800,7 @@ static int ptmx_open(struct inode *inode, struct file *filp)
800800
return retval;
801801
}
802802

803-
static struct file_operations ptmx_fops;
803+
static struct file_operations ptmx_fops __ro_after_init;
804804

805805
static void __init unix98_pty_init(void)
806806
{

0 commit comments

Comments
 (0)