[Bugs] [Bug 1346750] New: Unsafe access to inode->fd_list

bugzilla at redhat.com bugzilla at redhat.com
Wed Jun 15 09:54:59 UTC 2016


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

            Bug ID: 1346750
           Summary: Unsafe access to inode->fd_list
           Product: GlusterFS
           Version: 3.8.0
         Component: distribute
          Keywords: Triaged
          Severity: high
          Assignee: bugs at gluster.org
          Reporter: xhernandez at datalab.es
                CC: bugs at gluster.org, pkarampu at redhat.com
        Depends On: 1344340



+++ This bug was initially created as a clone of Bug #1344340 +++

Description of problem:

Access to inode->fd_list should be done while being protected with inode->lock.
All fd got from the list should be referenced before releasing the lock if they
are used later.

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


How reproducible:

Steps to Reproduce:
1. 
2.
3.

Actual results:


Expected results:


Additional info:

--- Additional comment from Vijay Bellur on 2016-06-09 17:13:09 CEST ---

REVIEW: http://review.gluster.org/14682 (cluster/dht: Fix unsafe iteration on
inode->fd_list) posted (#1) for review on master by Xavier Hernandez
(xhernandez at datalab.es)

--- Additional comment from Vijay Bellur on 2016-06-09 17:38:46 CEST ---

REVIEW: http://review.gluster.org/14682 (cluster/dht: Fix unsafe iteration on
inode->fd_list) posted (#2) for review on master by Xavier Hernandez
(xhernandez at datalab.es)

--- Additional comment from Vijay Bellur on 2016-06-15 11:04:35 CEST ---

COMMIT: http://review.gluster.org/14682 committed in master by Raghavendra G
(rgowdapp at redhat.com) 
------
commit 4c08d36e7c6f189499f2340eb529b7f4ceff57f6
Author: Xavier Hernandez <xhernandez at datalab.es>
Date:   Thu Jun 9 16:53:19 2016 +0200

    cluster/dht: Fix unsafe iteration on inode->fd_list

    When DHT traverses the inode->fd_list, it does that in an unsafe
    way that can generate races with fd_unref() called from other threads.

    This patch fixes this problem taking the inode->lock and adding a
    reference to the fd while it's being used outside of the mutex
    protected region.

    A minor change in storage/posix has been done to also access the
    inode->fd_list in a safe way.

    Change-Id: I10d469ca6a8f76e950a8c9779ae9c8b70f88ef93
    BUG: 1344340
    Signed-off-by: Xavier Hernandez <xhernandez at datalab.es>
    Reviewed-on: http://review.gluster.org/14682
    CentOS-regression: Gluster Build System <jenkins at build.gluster.org>
    Smoke: Gluster Build System <jenkins at build.gluster.org>
    NetBSD-regression: NetBSD Build System <jenkins at build.gluster.org>
    Reviewed-by: Raghavendra G <rgowdapp at redhat.com>


Referenced Bugs:

https://bugzilla.redhat.com/show_bug.cgi?id=1344340
[Bug 1344340] Unsafe access to inode->fd_list
-- 
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