• Christoph Hellwig's avatar
    nfs: fix xattr inode op pointers when disabled · 5f13ee9c
    Christoph Hellwig authored
    Chris Mason reported a NULL pointer derefernence in generic_getxattr()
    that was due to sb->s_xattr being NULL.
    
    The reason is that the nfs #ifdef's for ACL support were misplaced, and
    the nfs3 inode operations had the xattr operation pointers set up, even
    though xattrs were not actually supported.  As a result, the xattr code
    was being called without the infrastructure having been set up.
    
    Move the #ifdef's appropriately.
    Reported-and-tested-by: default avatarChris Mason <clm@fb.com>
    Acked-by: Al Viro viro@zeniv.linux.org.uk>
    Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
    5f13ee9c
nfs3proc.c 24.9 KB