lkml.org 
[lkml]   [2013]   [Jul]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 43/48] staging/lustre/build: fix 'data race condition' issues
    Date
    From: Sebastien Buisson <sebastien.buisson@bull.net>

    Fix 'data race condition' defects found by Coverity version
    6.5.0:
    Data race condition (MISSING_LOCK)
    Accessing variable without holding lock. Elsewhere,
    this variable is accessed with lock held.

    Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-2744
    Lustre-change: http://review.whamcloud.com/6569
    Signed-off-by: Sebastien Buisson <sebastien.buisson@bull.net>
    Reviewed-by: Bob Glossman <bob.glossman@intel.com>
    Reviewed-by: Keith Mannthey <keith.mannthey@intel.com>
    Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
    Signed-off-by: Peng Tao <tao.peng@emc.com>
    Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
    ---
    .../staging/lustre/lustre/include/lustre_import.h | 2 ++
    1 file changed, 2 insertions(+)

    diff --git a/drivers/staging/lustre/lustre/include/lustre_import.h b/drivers/staging/lustre/lustre/include/lustre_import.h
    index 3a5dd6a..67259eb 100644
    --- a/drivers/staging/lustre/lustre/include/lustre_import.h
    +++ b/drivers/staging/lustre/lustre/include/lustre_import.h
    @@ -336,9 +336,11 @@ static inline unsigned int at_timeout2est(unsigned int val)
    }

    static inline void at_reset(struct adaptive_timeout *at, int val) {
    + spin_lock(&at->at_lock);
    at->at_current = val;
    at->at_worst_ever = val;
    at->at_worst_time = cfs_time_current_sec();
    + spin_unlock(&at->at_lock);
    }
    static inline void at_init(struct adaptive_timeout *at, int val, int flags) {
    memset(at, 0, sizeof(*at));
    --
    1.7.9.5


    \
     
     \ /
      Last update: 2013-07-22 20:41    [W:2.823 / U:0.812 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site