* [PATCH 4.19] Revert "cifs: fix double free race when mount fails in cifs_get_root()"
@ 2022-09-28 2:49 Luo Meng
0 siblings, 0 replies; 2+ messages in thread
From: Luo Meng @ 2022-09-28 2:49 UTC (permalink / raw)
To: sfrench, stable; +Cc: linux-cifs, samba-technical, lsahlber, luomeng12
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.
Signed-off-by: Luo Meng <luomeng12@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 52b1524b40cd..7dce6d1fa50b 100644
--- a/fs/cifs/cifsfs.c
+++ b/fs/cifs/cifsfs.c
@@ -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;
--
2.31.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [PATCH 4.19] Revert "cifs: fix double free race when mount fails in cifs_get_root()"
@ 2022-09-28 3:49 Luo Meng
0 siblings, 0 replies; 2+ messages in thread
From: Luo Meng @ 2022-09-28 3:49 UTC (permalink / raw)
To: sfrench, stable; +Cc: linux-cifs, samba-technical, lsahlber, luomeng12, luomeng
From: Luo Meng <luomeng12@huawei.com>
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.
Signed-off-by: Luo Meng <luomeng12@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 52b1524b40cd..7dce6d1fa50b 100644
--- a/fs/cifs/cifsfs.c
+++ b/fs/cifs/cifsfs.c
@@ -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;
--
2.31.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-09-28 3:27 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-09-28 2:49 [PATCH 4.19] Revert "cifs: fix double free race when mount fails in cifs_get_root()" Luo Meng
-- strict thread matches above, loose matches on Subject: below --
2022-09-28 3:49 Luo Meng
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox