linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Sterba <dsterba@suse.cz>
To: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: Chris Mason <clm@fb.com>, Josef Bacik <josef@toxicpanda.com>,
	David Sterba <dsterba@suse.com>,
	linux-btrfs@vger.kernel.org, linux-fsdevel@vger.kernel.org
Subject: Re: [PATCH] fs/btrfs: On error always free subvol_name in btrfs_mount
Date: Wed, 30 Jan 2019 18:09:41 +0100	[thread overview]
Message-ID: <20190130170941.GX2900@twin.jikos.cz> (raw)
In-Reply-To: <87lg32p7y3.fsf@xmission.com>

On Wed, Jan 30, 2019 at 07:54:12AM -0600, Eric W. Biederman wrote:
> 
> The subvol_name is allocated in btrfs_parse_subvol_options and is
> consumed and freed in mount_subvol.  Add a free to the error paths that
> don't call mount_subvol so that it is guaranteed that subvol_name is
> freed when an error happens.
> 
> Fixes: 312c89fbca06 ("btrfs: cleanup btrfs_mount() using btrfs_mount_root()")
> Cc: stable@vger.kernel.org
> Cc: Chris Mason <clm@fb.com>
> Cc: Josef Bacik <josef@toxicpanda.com>
> Cc: David Sterba <dsterba@suse.com>
> Cc: linux-btrfs@vger.kernel.org
> Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>

Reviewed-by: David Sterba <dsterba@suse.com>

Added to 5.0-rc queue, thanks.

      parent reply	other threads:[~2019-01-30 17:10 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-30 13:54 [PATCH] fs/btrfs: On error always free subvol_name in btrfs_mount Eric W. Biederman
2019-01-30 14:50 ` Nikolay Borisov
2019-01-30 17:09 ` David Sterba [this message]

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=20190130170941.GX2900@twin.jikos.cz \
    --to=dsterba@suse.cz \
    --cc=clm@fb.com \
    --cc=dsterba@suse.com \
    --cc=ebiederm@xmission.com \
    --cc=josef@toxicpanda.com \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=linux-fsdevel@vger.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).