All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Sterba <dsterba@suse.cz>
To: Christian Engelmayer <cengelma@gmx.at>
Cc: linux-btrfs@vger.kernel.org, quwenruo@cn.fujitsu.com, clm@fb.com,
	jbacik@fb.com
Subject: Re: [PATCH] btrfs: qgroup: Fix possible leak in btrfs_add_qgroup_relation()
Date: Tue, 5 May 2015 15:20:04 +0200	[thread overview]
Message-ID: <20150505132004.GD5099@suse.cz> (raw)
In-Reply-To: <1430579995-24551-1-git-send-email-cengelma@gmx.at>

On Sat, May 02, 2015 at 05:19:55PM +0200, Christian Engelmayer wrote:
> Commit 9c8b35b1ba21 ("btrfs: quota: Automatically update related qgroups or
> mark INCONSISTENT flags when assigning/deleting a qgroup relations.")
> introduced the allocation of a temporary ulist in function
> btrfs_add_qgroup_relation() and added the corresponding cleanup to the out
> path. However, the allocation was introduced before the src/dst level check
> that directly returns. Fix the possible leakage of the ulist by moving the
> allocation after the input validation. Detected by Coverity CID 1295988.
> 
> Signed-off-by: Christian Engelmayer <cengelma@gmx.at>
Reviewed-by: David Sterba <dsterba@suse.cz>

      parent reply	other threads:[~2015-05-05 13:20 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-02 15:19 [PATCH] btrfs: qgroup: Fix possible leak in btrfs_add_qgroup_relation() Christian Engelmayer
2015-05-05  0:27 ` Qu Wenruo
2015-05-05 13:20 ` 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=20150505132004.GD5099@suse.cz \
    --to=dsterba@suse.cz \
    --cc=cengelma@gmx.at \
    --cc=clm@fb.com \
    --cc=jbacik@fb.com \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=quwenruo@cn.fujitsu.com \
    /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.