Hello,

here is a fix for a NULL pointer access problem with NFSv2 that isn't in
2.6.11-rc2-mm1, but it can't explain this NULL inode->i_op.

-- Andreas.
--- Begin Message ---
Hello,

this patch has an NFSv2 problem that I haven't tripped over until today. The 
fix is this:

------- 8< -------
Fix NFSv2 null pointer access

With NFSv2 we would try to follow a NULL getacl and setacl function
pointer here. Add the missing checks.

Signed-off-by: Andreas Gruenbacher <[EMAIL PROTECTED]>

Index: linux-2.6.10/fs/nfs/dir.c
===================================================================
--- linux-2.6.10.orig/fs/nfs/dir.c
+++ linux-2.6.10/fs/nfs/dir.c
@@ -984,6 +984,9 @@ static int nfs_set_default_acl(struct in
        struct posix_acl *dfacl, *acl;
        int error = 0;
 
+       if (NFS_PROTO(inode)->version != 3 ||
+           !NFS_PROTO(dir)->getacl || !NFS_PROTO(inode)->setacls)
+               return 0;
        dfacl = NFS_PROTO(dir)->getacl(dir, ACL_TYPE_DEFAULT);
        if (IS_ERR(dfacl)) {
                error = PTR_ERR(dfacl);


Regards,
-- 
Andreas Gruenbacher <[EMAIL PROTECTED]>
SUSE Labs, SUSE LINUX PRODUCTS GMBH
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

--- End Message ---

Reply via email to