* [PATCH] xfs: fix a memory leak in xfs_get_acl on error @ 2016-03-30 14:35 Mateusz Guzik 2016-03-30 20:26 ` Dave Chinner 2016-03-30 22:13 ` Andreas Gruenbacher 0 siblings, 2 replies; 6+ messages in thread From: Mateusz Guzik @ 2016-03-30 14:35 UTC (permalink / raw) To: xfs; +Cc: Andreas Gruenbacher, Al Viro 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; } -- 1.8.3.1 _______________________________________________ xfs mailing list xfs@oss.sgi.com http://oss.sgi.com/mailman/listinfo/xfs ^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] xfs: fix a memory leak in xfs_get_acl on error 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 2016-03-30 20:41 ` Mateusz Guzik 2016-03-30 22:13 ` Andreas Gruenbacher 1 sibling, 1 reply; 6+ messages in thread From: Dave Chinner @ 2016-03-30 20:26 UTC (permalink / raw) To: Mateusz Guzik; +Cc: Andreas Gruenbacher, Al Viro, xfs 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 ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] xfs: fix a memory leak in xfs_get_acl on error 2016-03-30 20:26 ` Dave Chinner @ 2016-03-30 20:41 ` Mateusz Guzik 2016-03-30 22:05 ` Dave Chinner 2016-03-30 22:11 ` Andreas Gruenbacher 0 siblings, 2 replies; 6+ messages in thread From: Mateusz Guzik @ 2016-03-30 20:41 UTC (permalink / raw) To: Dave Chinner; +Cc: Andreas Gruenbacher, Al Viro, xfs On Thu, Mar 31, 2016 at 07:26:55AM +1100, Dave Chinner wrote: > 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? > The patch which introuced the bug is not present in 4.6-rc1. The patch is against next-20160330, the bug was introduced in: commit ae4e84be32ef6fdf97f10852778597b1a2be3cba Author: Andreas Gruenbacher <agruenba@redhat.com> Date: Thu Mar 24 14:38:37 2016 +0100 posix_acl: Inode acl caching fixes Apologies if this should have been handled differently (by replying to the original patch?) -- Mateusz Guzik _______________________________________________ xfs mailing list xfs@oss.sgi.com http://oss.sgi.com/mailman/listinfo/xfs ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] xfs: fix a memory leak in xfs_get_acl on error 2016-03-30 20:41 ` Mateusz Guzik @ 2016-03-30 22:05 ` Dave Chinner 2016-03-30 22:11 ` Andreas Gruenbacher 1 sibling, 0 replies; 6+ messages in thread From: Dave Chinner @ 2016-03-30 22:05 UTC (permalink / raw) To: Mateusz Guzik; +Cc: Andreas Gruenbacher, Al Viro, xfs On Wed, Mar 30, 2016 at 10:41:20PM +0200, Mateusz Guzik wrote: > On Thu, Mar 31, 2016 at 07:26:55AM +1100, Dave Chinner wrote: > > 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? > > > > The patch which introuced the bug is not present in 4.6-rc1. > > The patch is against next-20160330, the bug was introduced in: > > commit ae4e84be32ef6fdf97f10852778597b1a2be3cba > Author: Andreas Gruenbacher <agruenba@redhat.com> > Date: Thu Mar 24 14:38:37 2016 +0100 > > posix_acl: Inode acl caching fixes > > Apologies if this should have been handled differently (by replying to the > original patch?) You need to put this information in the patch description so we don't have to guess at what it applies to. Most maintainers assume that if it is not mentioned, the patch should apply to their current top of tree.... Cheers, Dave. -- Dave Chinner david@fromorbit.com _______________________________________________ xfs mailing list xfs@oss.sgi.com http://oss.sgi.com/mailman/listinfo/xfs ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] xfs: fix a memory leak in xfs_get_acl on error 2016-03-30 20:41 ` Mateusz Guzik 2016-03-30 22:05 ` Dave Chinner @ 2016-03-30 22:11 ` Andreas Gruenbacher 1 sibling, 0 replies; 6+ messages in thread From: Andreas Gruenbacher @ 2016-03-30 22:11 UTC (permalink / raw) To: Mateusz Guzik; +Cc: Al Viro, XFS Developers On Wed, Mar 30, 2016 at 10:41 PM, Mateusz Guzik <mguzik@redhat.com> wrote: > On Thu, Mar 31, 2016 at 07:26:55AM +1100, Dave Chinner wrote: >> 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? >> > > The patch which introuced the bug is not present in 4.6-rc1. The patch is on the work.acl branch of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs.git. Thanks, Andreas _______________________________________________ xfs mailing list xfs@oss.sgi.com http://oss.sgi.com/mailman/listinfo/xfs ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] xfs: fix a memory leak in xfs_get_acl on error 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 @ 2016-03-30 22:13 ` Andreas Gruenbacher 1 sibling, 0 replies; 6+ messages in thread From: Andreas Gruenbacher @ 2016-03-30 22:13 UTC (permalink / raw) To: Mateusz Guzik; +Cc: Al Viro, XFS Developers On Wed, Mar 30, 2016 at 4:35 PM, Mateusz Guzik <mguzik@redhat.com> wrote: > Signed-off-by: Mateusz Guzik <mguzik@redhat.com> Reviewed-by: Andreas Gruenbacher <agruenba@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; > } > -- > 1.8.3.1 > _______________________________________________ xfs mailing list xfs@oss.sgi.com http://oss.sgi.com/mailman/listinfo/xfs ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2016-03-30 22:13 UTC | newest] Thread overview: 6+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 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 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
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox