[Bugs] [Bug 1423373] Crash in index xlator because of race in inode_ctx_set and inode_ref

bugzilla at redhat.com bugzilla at redhat.com
Mon Feb 20 03:26:18 UTC 2017


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



--- Comment #2 from Worker Ant <bugzilla-bot at gluster.org> ---
COMMIT: https://review.gluster.org/16622 committed in master by Pranith Kumar
Karampuri (pkarampu at redhat.com) 
------
commit 4badd7334d345b1c27f528140e4c28afaf1f32f6
Author: Poornima G <pgurusid at redhat.com>
Date:   Wed Feb 15 11:18:31 2017 +0530

    libglusterfs: Fix a crash due to race between inode_ctx_set and inode_ref

    Issue:
    Currently inode ref count is gaurded by inode_table->lock, and
    inode_ctx is gauarded by inode->lock. With the new patch [1]
    inode_ref was modified to change the inode_ctx to track the ref
    count per xlator. Thus inode_ref performed under inode_table->lock
    is modifying inode_ctx which has to be modified only under inode->lock

    Solution:
    When a inode is created, inode_ctx holder is allocated for all the xlators.
    Hence in case of inode_ctx_set instead of using the first free index in
    inode ctx holder, we can have predecided index for every xlator in the
graph.

    Credits Pranith K <pkarampu at redhat.com>

    [1] http://review.gluster.org/13736

    Change-Id: I1bfe111c211fcc4fcd761bba01dc87c4c69b5170
    BUG: 1423373
    Signed-off-by: Poornima G <pgurusid at redhat.com>
    Reviewed-on: https://review.gluster.org/16622
    Smoke: Gluster Build System <jenkins at build.gluster.org>
    NetBSD-regression: NetBSD Build System <jenkins at build.gluster.org>
    Reviewed-by: Niels de Vos <ndevos at redhat.com>
    CentOS-regression: Gluster Build System <jenkins at build.gluster.org>
    Reviewed-by: Pranith Kumar Karampuri <pkarampu at redhat.com>

-- 
You are receiving this mail because:
You are on the CC list for the bug.
Unsubscribe from this bug https://bugzilla.redhat.com/token.cgi?t=hpyIm6lDoB&a=cc_unsubscribe


More information about the Bugs mailing list