From 98928953ae42e3ac55c341439219e236734b499e Mon Sep 17 00:00:00 2001 From: Luo Meng Date: Mon, 7 Nov 2022 20:51:52 +0800 Subject: [PATCH] Revert "cifs: fix double free race when mount fails in cifs_get_root()" hulk inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I5WBQA CVE: NA -------------------------------- This reverts commit 1f9fa07bfd68f9bcf65e80d59606e71878c74c64. Commit 2fe0e281f7ad witch merged by LTS (cifs: fix double free race when mount fails in cifs_get_root()) fixes a double free. However, the previous patch d17abdf75665 is not merged. There is no such issue on 5.10 because it will return after cifs_cleanup_volume_info(). Since merge this patch, cifs_cleanup_volume_info() is skipped, leading to a memory leak. Signed-off-by: Luo Meng Reviewed-by: Zhang Xiaoxu Signed-off-by: Zheng Zengkai --- fs/cifs/cifsfs.c | 1 - 1 file changed, 1 deletion(-) diff --git a/fs/cifs/cifsfs.c b/fs/cifs/cifsfs.c index bc957e6ca48b..6e1e7e44706c 100644 --- a/fs/cifs/cifsfs.c +++ b/fs/cifs/cifsfs.c @@ -864,7 +864,6 @@ cifs_smb3_do_mount(struct file_system_type *fs_type, out_super: deactivate_locked_super(sb); - return root; out: cifs_cleanup_volume_info(volume_info); return root; -- GitLab