diff options
author | Sebastien Buisson <sbuisson@ddn.com> | 2016-03-07 23:10:20 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-03-08 00:17:45 (GMT) |
commit | ea7a1484baa33574f932f0ade4443072ec0fc9fe (patch) | |
tree | f4e93b39f6c604842ddc201bbf3273d1cadde518 /drivers/staging/lustre/lnet/selftest/framework.c | |
parent | a739735c55a961d342652b38b27d3ef1c2d1ca1c (diff) | |
download | linux-ea7a1484baa33574f932f0ade4443072ec0fc9fe.tar.xz |
staging: lustre: fix 'data race condition' issue in framework.c
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.
Signed-off-by: Sebastien Buisson <sbuisson@ddn.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-2744
Reviewed-on: http://review.whamcloud.com/6568
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/lustre/lnet/selftest/framework.c')
-rw-r--r-- | drivers/staging/lustre/lnet/selftest/framework.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/staging/lustre/lnet/selftest/framework.c b/drivers/staging/lustre/lnet/selftest/framework.c index dbd2c61..5c7cafa 100644 --- a/drivers/staging/lustre/lnet/selftest/framework.c +++ b/drivers/staging/lustre/lnet/selftest/framework.c @@ -981,9 +981,8 @@ sfw_run_test(swi_workitem_t *wi) list_add_tail(&rpc->crpc_list, &tsi->tsi_active_rpcs); spin_unlock(&tsi->tsi_lock); - rpc->crpc_timeout = rpc_timeout; - spin_lock(&rpc->crpc_lock); + rpc->crpc_timeout = rpc_timeout; srpc_post_rpc(rpc); spin_unlock(&rpc->crpc_lock); return 0; |