Skip to contentSkip to conversation

Revert "cifs: fix double free race when mount fails in cifs_get_root()"

PATCH New Luo Meng 1 participant 1 message Sep 28, 2022

Subsystems (2)
lore
Share & tools
lore

Luo Meng

author
#0 lore raw

PATCH 1/1 Revert "cifs: fix double free race when mount fails in cifs_get_root()"

This reverts commit 2fe0e281f7ad0a62259649764228227dd6b2561d.

Commit 2fe0e281f7ad (cifs: fix double free race when mount fails in cifs_get_root()) fixes a double. However there is no such issue on 4.19 because it will return after cifs_cleanup_volume_info().

Since merge this patch, cifs_cleanup_volume_info() is skipped, leading to a memory leak.

---
 fs/cifs/cifsfs.c | 1 -
 1 file changed, 1 deletion(-)
fs/cifs/cifsfs.c +0 -1
index 52b1524b40cd..7dce6d1fa50b 100644
@@ -779,7 +779,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;
Signature · 1 line
2.31.1