在 2022/11/10 12:17, Guoqing Jiang 写道:
On 11/7/22 8:51 PM, Zheng Zengkai wrote:
From: Luo Meng luomeng12@huawei.com
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 luomeng12@huawei.com Reviewed-by: Zhang Xiaoxu zhangxiaoxu5@huawei.com Signed-off-by: Zheng Zengkai zhengzengkai@huawei.com
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;
I'd suggest to send it to 5.10 stable too.
Thanks, Guoqing
Yes, I have backported this patch to openEuler-22.0-LTS branch,
thanks!
Kernel mailing list -- kernel@openeuler.org To unsubscribe send an email to kernel-leave@openeuler.org