All of lore.kernel.org
 help / color / mirror / Atom feed
From: Luo Meng <luomeng12@huawei.com>
To: <sfrench@samba.org>, <stable@kernel.org>
Cc: <linux-cifs@vger.kernel.org>, <samba-technical@lists.samba.org>,
	<lsahlber@redhat.com>, <luomeng12@huawei.com>
Subject: [PATCH 4.19] Revert "cifs: fix double free race when mount fails in cifs_get_root()"
Date: Wed, 28 Sep 2022 10:49:55 +0800	[thread overview]
Message-ID: <20220928024955.3001504-1-luomeng12@huawei.com> (raw)

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


             reply	other threads:[~2022-09-28  2:28 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-28  2:49 Luo Meng [this message]
2022-09-28  3:49 [PATCH 4.19] Revert "cifs: fix double free race when mount fails in cifs_get_root()" Luo Meng

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220928024955.3001504-1-luomeng12@huawei.com \
    --to=luomeng12@huawei.com \
    --cc=linux-cifs@vger.kernel.org \
    --cc=lsahlber@redhat.com \
    --cc=samba-technical@lists.samba.org \
    --cc=sfrench@samba.org \
    --cc=stable@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.