mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-11 23:24:22 -04:00
UPSTREAM: virtiofs: fix userns
[ Upstream commit 0a7419c68a45d2d066b996be5087aa2d07ce80eb ] get_user_ns() is done twice (once in virtio_fs_get_tree() and once in fuse_conn_init()), resulting in a reference leak. Also looks better to use fsc->user_ns (which *should* be the current_user_ns() at this point). Change-Id: If41a5cefac82bc65e880ad14ed90f1adca9271ae Signed-off-by: Miklos Szeredi <mszeredi@redhat.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
b9bba860d2
commit
3d04982cea
1 changed files with 1 additions and 2 deletions
|
|
@ -1474,8 +1474,7 @@ static int virtio_fs_get_tree(struct fs_context *fsc)
|
|||
return -ENOMEM;
|
||||
}
|
||||
|
||||
fuse_conn_init(fc, fm, get_user_ns(current_user_ns()),
|
||||
&virtio_fs_fiq_ops, fs);
|
||||
fuse_conn_init(fc, fm, fsc->user_ns, &virtio_fs_fiq_ops, fs);
|
||||
fc->release = fuse_free_conn;
|
||||
fc->delete_stale = true;
|
||||
fc->auto_submounts = true;
|
||||
|
|
|
|||
Loading…
Reference in a new issue