mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-12-31 07:10:25 -05:00
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>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
a727b025f4
commit
d2ec3f77de
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user