public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Dave Chinner <david@fromorbit.com>
To: Mateusz Guzik <mguzik@redhat.com>
Cc: Andreas Gruenbacher <agruenba@redhat.com>,
	Al Viro <viro@zeniv.linux.org.uk>,
	xfs@oss.sgi.com
Subject: Re: [PATCH] xfs: fix a memory leak in xfs_get_acl on error
Date: Thu, 31 Mar 2016 07:26:55 +1100	[thread overview]
Message-ID: <20160330202655.GH30721@dastard> (raw)
In-Reply-To: <1459348507-20406-1-git-send-email-mguzik@redhat.com>

On Wed, Mar 30, 2016 at 04:35:07PM +0200, Mateusz Guzik wrote:
> Signed-off-by: Mateusz Guzik <mguzik@redhat.com>
> ---
>  fs/xfs/xfs_acl.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/fs/xfs/xfs_acl.c b/fs/xfs/xfs_acl.c
> index 2dad2b5..ce10c4c 100644
> --- a/fs/xfs/xfs_acl.c
> +++ b/fs/xfs/xfs_acl.c
> @@ -162,10 +162,11 @@ xfs_get_acl(struct inode *inode, int type)
>  		 */
>  		if (error != -ENOATTR)
>  			acl = ERR_PTR(error);
> -		return acl;
> +		goto out;
>  	}
>  
>  	acl = xfs_acl_from_disk(xfs_acl, len, XFS_ACL_MAX_ENTRIES(ip->i_mount));
> +out:
>  	kmem_free(xfs_acl);
>  	return acl;
>  }

Hi Mateusz,

It looks like we've already fixed this problem - can you check
4.6-rc1 and if the leak is still there post an updated patch?

Cheers,

Dave.

-- 
Dave Chinner
david@fromorbit.com

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

  reply	other threads:[~2016-03-30 20:27 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-30 14:35 [PATCH] xfs: fix a memory leak in xfs_get_acl on error Mateusz Guzik
2016-03-30 20:26 ` Dave Chinner [this message]
2016-03-30 20:41   ` Mateusz Guzik
2016-03-30 22:05     ` Dave Chinner
2016-03-30 22:11     ` Andreas Gruenbacher
2016-03-30 22:13 ` Andreas Gruenbacher

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=20160330202655.GH30721@dastard \
    --to=david@fromorbit.com \
    --cc=agruenba@redhat.com \
    --cc=mguzik@redhat.com \
    --cc=viro@zeniv.linux.org.uk \
    --cc=xfs@oss.sgi.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox