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.

-- 
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]>
Index: gfs2_crap/fs/gfs2/inode.c
===================================================================
--- gfs2_crap.orig/fs/gfs2/inode.c      2007-01-04 19:40:39.000000000 -0600
+++ gfs2_crap/fs/gfs2/inode.c   2007-01-04 19:43:01.694217574 -0600
@@ -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;
 }
 

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to