提交 8680e22f 编写于 作者: G Gerald Schaefer 提交者: Linus Torvalds

[PATCH] VFS: memory leak in do_kern_mount()

There is a memory leak during mount when CONFIG_SECURITY is enabled and
mount options are specified.
Signed-off-by: NGerald Schaefer <geraldsc@de.ibm.com>
Acked-by: NJames Morris <jmorris@redhat.com>
Signed-off-by: NAndrew Morton <akpm@osdl.org>
Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
上级 2894801d
...@@ -835,6 +835,7 @@ do_kern_mount(const char *fstype, int flags, const char *name, void *data) ...@@ -835,6 +835,7 @@ do_kern_mount(const char *fstype, int flags, const char *name, void *data)
mnt->mnt_parent = mnt; mnt->mnt_parent = mnt;
mnt->mnt_namespace = current->namespace; mnt->mnt_namespace = current->namespace;
up_write(&sb->s_umount); up_write(&sb->s_umount);
free_secdata(secdata);
put_filesystem(type); put_filesystem(type);
return mnt; return mnt;
out_sb: out_sb:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册