hi,
coverity made me look at this code (bug id #344).
We only return with XFS_ERROR(EINVAL) if mp->m_rtdev_targp
is valid and pass it otherwise to xfs_read_buf() where some
function calls later it gets dereferenced by an assert.
Coverity flags another 18 flags in the xfs code, since
it is quite different from the rest of the kernel code maybe one
of the sgi guys might want to look at them since i have some problems
understanding the code
Signed-off-by: Eric Sesterhenn <snakebyte@xxxxxx>
--- linux-2.6.17-git11/fs/xfs/xfs_rtalloc.c.orig 2006-06-27
21:39:05.000000000 +0200
+++ linux-2.6.17-git11/fs/xfs/xfs_rtalloc.c 2006-06-27 21:41:33.000000000
+0200
@@ -1929,7 +1929,7 @@ xfs_growfs_rt(
/*
* Initial error checking.
*/
- if (mp->m_rtdev_targp || mp->m_rbmip == NULL ||
+ if (mp->m_rtdev_targp == NULL || mp->m_rbmip == NULL ||
(nrblocks = in->newblocks) <= sbp->sb_rblocks ||
(sbp->sb_rblocks && (in->extsize != sbp->sb_rextsize)))
return XFS_ERROR(EINVAL);
|