| To: | xfs@xxxxxxxxxxx |
|---|---|
| Subject: | [PATCH 3/9] xfsprogs: fix missing error check in xfs_rtfree_range in libxfs |
| From: | Dave Chinner <david@xxxxxxxxxxxxx> |
| Date: | Thu, 14 Jan 2010 21:09:06 +1100 |
| In-reply-to: | <1263463752-5052-1-git-send-email-david@xxxxxxxxxxxxx> |
| References: | <1263463752-5052-1-git-send-email-david@xxxxxxxxxxxxx> |
When xfs_rtfind_forw() returns an error, the block is returned
uninitialised. xfs_rtfree_range() is not checking the error return,
so could be using an uninitialised block number for modifying bitmap
summary info.
Signed-off-by: Dave Chinner <david@xxxxxxxxxxxxx>
---
libxfs/xfs_rtalloc.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/libxfs/xfs_rtalloc.c b/libxfs/xfs_rtalloc.c
index 6c3da52..4fbdaa9 100644
--- a/libxfs/xfs_rtalloc.c
+++ b/libxfs/xfs_rtalloc.c
@@ -466,6 +466,8 @@ xfs_rtfree_range(
*/
error = xfs_rtfind_forw(mp, tp, end, mp->m_sb.sb_rextents - 1,
&postblock);
+ if (error)
+ return error;
/*
* If there are blocks not being freed at the front of the
* old extent, add summary data for them to be allocated.
--
1.6.5
|
| Previous by Date: | [PATCH 2/9] xfsprogs: Fix miscellaneous warnings in libxfs, Dave Chinner |
|---|---|
| Next by Date: | [PATCH 8/9] xfsprogs: fix sign warning in mkfs directory code, Dave Chinner |
| Previous by Thread: | Re: [PATCH 2/9] xfsprogs: Fix miscellaneous warnings in libxfs, Christoph Hellwig |
| Next by Thread: | Re: [PATCH 3/9] xfsprogs: fix missing error check in xfs_rtfree_range in libxfs, Christoph Hellwig |
| Indexes: | [Date] [Thread] [Top] [All Lists] |