07 Sep, 2017

1 commit

  • The function is never called outside of fs/ocfs2/acl.c.

    Link: http://lkml.kernel.org/r/20170801141252.19675-2-jack@suse.cz
    Signed-off-by: Jan Kara
    Cc: Mark Fasheh
    Cc: Joel Becker
    Cc: Junxiao Bi
    Cc: Joseph Qi
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jan Kara
     

13 May, 2016

2 commits

  • Commit 702e5bc68ad2 ("ocfs2: use generic posix ACL infrastructure")
    refactored code to use posix_acl_create. The problem with this function
    is that it is not mindful of the cluster wide inode lock making it
    unsuitable for use with ocfs2 inode creation with ACLs. For example,
    when used in ocfs2_mknod, this function can cause deadlock as follows.
    The parent dir inode lock is taken when calling posix_acl_create ->
    get_acl -> ocfs2_iop_get_acl which takes the inode lock again. This can
    cause deadlock if there is a blocked remote lock request waiting for the
    lock to be downconverted. And same deadlock happened in ocfs2_reflink.
    This fix is to revert back using ocfs2_init_acl.

    Fixes: 702e5bc68ad2 ("ocfs2: use generic posix ACL infrastructure")
    Signed-off-by: Tariq Saeed
    Signed-off-by: Junxiao Bi
    Cc: Mark Fasheh
    Cc: Joel Becker
    Cc: Joseph Qi
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Junxiao Bi
     
  • Commit 743b5f1434f5 ("ocfs2: take inode lock in ocfs2_iop_set/get_acl()")
    introduced this issue. ocfs2_setattr called by chmod command holds
    cluster wide inode lock when calling posix_acl_chmod. This latter
    function in turn calls ocfs2_iop_get_acl and ocfs2_iop_set_acl. These
    two are also called directly from vfs layer for getfacl/setfacl commands
    and therefore acquire the cluster wide inode lock. If a remote
    conversion request comes after the first inode lock in ocfs2_setattr,
    OCFS2_LOCK_BLOCKED will be set. And this will cause the second call to
    inode lock from the ocfs2_iop_get_acl() to block indefinetly.

    The deleted version of ocfs2_acl_chmod() calls __posix_acl_chmod() which
    does not call back into the filesystem. Therefore, we restore
    ocfs2_acl_chmod(), modify it slightly for locking as needed, and use that
    instead.

    Fixes: 743b5f1434f5 ("ocfs2: take inode lock in ocfs2_iop_set/get_acl()")
    Signed-off-by: Tariq Saeed
    Signed-off-by: Junxiao Bi
    Cc: Mark Fasheh
    Cc: Joel Becker
    Cc: Joseph Qi
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Junxiao Bi
     

26 Jan, 2014

1 commit


26 Jul, 2011

1 commit

  • Replace the ->check_acl method with a ->get_acl method that simply reads an
    ACL from disk after having a cache miss. This means we can replace the ACL
    checking boilerplate code with a single implementation in namei.c.

    Signed-off-by: Christoph Hellwig
    Signed-off-by: Al Viro

    Christoph Hellwig
     

20 Jul, 2011

1 commit


07 Jan, 2011

1 commit


29 Oct, 2009

1 commit

  • To become consistent with filesystems such as XFS or BTRFS, make posix
    ACLs always available. This also reduces possibility of
    misconfiguration on admin's side.

    Signed-off-by: Jan Kara
    Signed-off-by: Joel Becker

    Jan Kara
     

06 Jan, 2009

4 commits