[Bugs] [Bug 1668286] New: READDIRP incorrectly updates posix-acl inode ctx

bugzilla at redhat.com bugzilla at redhat.com
Tue Jan 22 11:11:54 UTC 2019


https://bugzilla.redhat.com/show_bug.cgi?id=1668286

            Bug ID: 1668286
           Summary: READDIRP incorrectly updates posix-acl inode ctx
           Product: GlusterFS
           Version: 5
                OS: Linux
            Status: NEW
         Component: read-ahead
          Severity: high
          Assignee: bugs at gluster.org
          Reporter: homma at allworks.co.jp
                CC: bugs at gluster.org
  Target Milestone: ---
    Classification: Community



Description of problem:

On FUSE client with mount option use-readdirp=on (default) and acl, access to a
file is denied for about a second after listing the directory in which the file
resides.


Version-Release number of selected component (if applicable):

glusterfs-fuse.x86_64 5.2-1.el7 from centos-gluster5 repository


How reproducible:

Always, with mount option use-readdirp=on and acl


Steps to Reproduce:

1. Mount GlusterFS volume with acl and use-readdirp=on

2. Chdir to the mounted directory

3. Execute the following commands:
echo TEST > foo; echo -n "[`date -u --rfc-3339=ns`] "; cat foo; ls -l; while :;
do echo -n "[`date -u --rfc-3339=ns`] "; cat foo && break; usleep 200000; done


Actual results:

Access is denied for about a second after executing ls:

[2019-01-22 10:24:18.802855191+00:00] TEST
total 1
-rw-rw-r-- 1 centos centos 5 Jan 22 16:30 bar
-rw-rw-r-- 1 centos centos 5 Jan 22 19:24 foo
[2019-01-22 10:24:18.825725474+00:00] cat: foo: Permission denied
[2019-01-22 10:24:19.029015958+00:00] cat: foo: Permission denied
[2019-01-22 10:24:19.232249483+00:00] cat: foo: Permission denied
[2019-01-22 10:24:19.435580108+00:00] cat: foo: Permission denied
[2019-01-22 10:24:19.638781941+00:00] cat: foo: Permission denied
[2019-01-22 10:24:19.843016193+00:00] TEST

Gluster log on the client:

[2019-01-22 10:24:18.826671] I [MSGID: 139001]
[posix-acl.c:263:posix_acl_log_permit_denied] 0-posix-acl-autoload: client: -,
gfid: e16e1d3e-7518-4323-982f-1ad348f9608f,
req(uid:1000,gid:1000,perm:4,ngrps:4),
ctx(uid:0,gid:0,in-groups:0,perm:000,updated-fop:READDIRP, acl:-) [Permission
denied]
[2019-01-22 10:24:18.826711] W [fuse-bridge.c:1124:fuse_fd_cbk]
0-glusterfs-fuse: 930: OPEN() /centos/test/foo => -1 (Permission denied)
[2019-01-22 10:24:19.030036] W [fuse-bridge.c:1124:fuse_fd_cbk]
0-glusterfs-fuse: 931: OPEN() /centos/test/foo => -1 (Permission denied)
[2019-01-22 10:24:19.233301] W [fuse-bridge.c:1124:fuse_fd_cbk]
0-glusterfs-fuse: 932: OPEN() /centos/test/foo => -1 (Permission denied)
[2019-01-22 10:24:19.436612] W [fuse-bridge.c:1124:fuse_fd_cbk]
0-glusterfs-fuse: 933: OPEN() /centos/test/foo => -1 (Permission denied)
[2019-01-22 10:24:19.639804] W [fuse-bridge.c:1124:fuse_fd_cbk]
0-glusterfs-fuse: 934: OPEN() /centos/test/foo => -1 (Permission denied)
The message "I [MSGID: 139001] [posix-acl.c:263:posix_acl_log_permit_denied]
0-posix-acl-autoload: client: -, gfid: e16e1d3e-7518-4323-982f-1ad348f9608f,
req(uid:1000,gid:1000,perm:4,ngrps:4),
ctx(uid:0,gid:0,in-groups:0,perm:000,updated-fop:READDIRP, acl:-) [Permission
denied]" repeated 4 times between [2019-01-22 10:24:18.826671] and [2019-01-22
10:24:19.639797]


Expected results:

Access to the file is always granted.


Additional info:

In readdir-ahead.c, rda_fill_fd_cbk() replaces dentries and zeroes out iatts
exept for ia_gfid and ia_type.
Then in posix-acl.c, posix_acl_readdirp_cbk() updates its inode ctx by that
zeroed permission, and permission is denied.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
You are the assignee for the bug.


More information about the Bugs mailing list