Ben Greear <greearb@xxxxxxxxxxxxxxx> reports that NFSD panics in posix_acl_equiv_mode() during an NFSv3 SETACL operation. I have reproduced this using an exported tmpfs and cthon04 with NFSv3. A survey of .set_acl methods suggests that simple_set_acl() must tolerate a NULL "acl" argument. Fixes: feda821e76f3bbbba4bd54d30b4d4005a7848aa5 Signed-off-by: Chuck Lever <chuck.lever@xxxxxxxxxx> --- fs/posix_acl.c | 12 +++++++----- 1 files changed, 7 insertions(+), 5 deletions(-) diff --git a/fs/posix_acl.c b/fs/posix_acl.c index 9e363e4..0b25aae 100644 --- a/fs/posix_acl.c +++ b/fs/posix_acl.c @@ -863,11 +863,13 @@ int simple_set_acl(struct inode *inode, struct posix_acl *acl, int type) int error; if (type == ACL_TYPE_ACCESS) { - error = posix_acl_equiv_mode(acl, &inode->i_mode); - if (error < 0) - return 0; - if (error == 0) - acl = NULL; + if (acl) { + error = posix_acl_equiv_mode(acl, &inode->i_mode); + if (error < 0) + return 0; + if (error == 0) + acl = NULL; + } } inode->i_ctime = CURRENT_TIME; -- To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html