Re: [PATCH V2] catch acl==NULL in __jfs_set_acl (fixed null pointer dereference)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> You don't need to initialise rc here.

Yes, you are true. I missed the __jfs_setxattr before the set_cached_acl.

But why not, more simply:
> 
> +++ b/fs/jfs/acl.c
> @@ -83,6 +83,8 @@ static int __jfs_set_acl(tid_t tid, struct inode *inode, int t
>         switch (type) {
>         case ACL_TYPE_ACCESS:
>                 ea_name = POSIX_ACL_XATTR_ACCESS;
> +               if (!acl)
> +                       break;
>                 rc = posix_acl_equiv_mode(acl, &inode->i_mode);
>                 if (rc < 0)
>                         return rc;

I could have done it like this, but I copied the way it was done in btrfs/acl.c, where the jfs implementation seems to come from.

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature


[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux