changes V2: I forgot to set rc = 0, leaving it uninitialized if acl was NULL. --- linux-3.14.2.vanilla/fs/jfs/acl.c 2014-04-28 17:24:55.544597204 +0200 +++ linux-3.14.2/fs/jfs/acl.c 2014-04-29 19:57:27.028465728 +0200 @@ -83,13 +83,16 @@ switch (type) { case ACL_TYPE_ACCESS: ea_name = POSIX_ACL_XATTR_ACCESS; - rc = posix_acl_equiv_mode(acl, &inode->i_mode); - if (rc < 0) - return rc; - inode->i_ctime = CURRENT_TIME; - mark_inode_dirty(inode); - if (rc == 0) - acl = NULL; + if( acl ) { + rc = posix_acl_equiv_mode(acl, &inode->i_mode); + if (rc < 0) + return rc; + inode->i_ctime = CURRENT_TIME; + mark_inode_dirty(inode); + if (rc == 0) + acl = NULL; + } + rc = 0; break; case ACL_TYPE_DEFAULT: ea_name = POSIX_ACL_XATTR_DEFAULT;
Attachment:
smime.p7s
Description: S/MIME Cryptographic Signature