提交 d2ec3f77 编写于 作者: K Kees Cook 提交者: Greg Kroah-Hartman

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: NKees Cook <keescook@chromium.org>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 a727b025
......@@ -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)
{
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册