GFS2: Fix incorrect return code from gfs2_lookupi
Subsystems (2)
PATCH 1/1 GFS2: Fix incorrect return code from gfs2_lookupi
This fixes a bug found by the fsfuzzer tool.
http://projects.info-pull.com/mokb/MOKB-15-11-2006.html
A NULL was not an acceptable error condition expected by any of the gfs2_lookupi callers.
Signature · 1 line
Russell Cattelan <[email protected]>
Change gfs2_lookupi to either return an inode or an error. None of the callers of gfs2_lookupi expect a NULL on error and such would end up dereferencing all NULL ptr.
This fixes:
http://projects.info-pull.com/mokb/MOKB-15-11-2006.html
Signed-off-by Russell Cattelan <[email protected]>
fs/gfs2/inode.c +1 -1
@@ -419,7 +419,7 @@ struct inode *gfs2_lookupi(struct inode out:gfs2_glock_dq_uninit (&d_gh);if (error == -ENOENT ) -return NULL ; +return ERR_PTR (error);return inode; }
Hi,
Quoted 6 lines · Russell Cattelan
This fixes a bug found by the fsfuzzer tool.
http://projects.info-pull.com/mokb/MOKB-15-11-2006.htmlA NULL was not an acceptable error condition expected by any of the
gfs2_lookupicallers.
Now applied to the GFS2 git tree. Thanks,
Steve.