aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs
diff options
context:
space:
mode:
authorDave Chinner <dchinner@redhat.com>2012-06-12 14:20:26 +1000
committerBen Hutchings <ben@decadent.org.uk>2014-08-06 18:07:40 +0100
commit381687bd230ca824df7a70aa1f8fa3a4345ee6e2 (patch)
tree4db141f52c8de5ff0096b07f3a3502fd6a9eb5ab /fs/xfs
parent0368fea2438c346e753aa37606688c421ba11c4b (diff)
downloadkernel_samsung_smdk4412-381687bd230ca824df7a70aa1f8fa3a4345ee6e2.zip
kernel_samsung_smdk4412-381687bd230ca824df7a70aa1f8fa3a4345ee6e2.tar.gz
kernel_samsung_smdk4412-381687bd230ca824df7a70aa1f8fa3a4345ee6e2.tar.bz2
xfs: fix allocbt cursor leak in xfs_alloc_ag_vextent_near
commit 76d095388b040229ea1aad7dea45be0cfa20f589 upstream. When we fail to find an matching extent near the requested extent specification during a left-right distance search in xfs_alloc_ag_vextent_near, we fail to free the original cursor that we used to look up the XFS_BTNUM_CNT tree and hence leak it. Reported-by: Chris J Arges <chris.j.arges@canonical.com> Signed-off-by: Dave Chinner <dchinner@redhat.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Ben Myers <bpm@sgi.com> Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Diffstat (limited to 'fs/xfs')
-rw-r--r--fs/xfs/xfs_alloc.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/xfs/xfs_alloc.c b/fs/xfs/xfs_alloc.c
index ce84ffd..9ecda2f 100644
--- a/fs/xfs/xfs_alloc.c
+++ b/fs/xfs/xfs_alloc.c
@@ -1081,6 +1081,7 @@ restart:
goto restart;
}
+ xfs_btree_del_cursor(cnt_cur, XFS_BTREE_NOERROR);
trace_xfs_alloc_size_neither(args);
args->agbno = NULLAGBLOCK;
return 0;