From: James Simmons <jsimmons@infradead.org>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
devel@driverdev.osuosl.org,
Andreas Dilger <andreas.dilger@intel.com>,
Oleg Drokin <oleg.drokin@intel.com>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Lustre Development List <lustre-devel@lists.lustre.org>,
Sebastien Buisson <sbuisson@ddn.com>
Subject: [PATCH 05/10] staging: lustre: fix 'data race condition' issue in framework.c
Date: Fri, 4 Mar 2016 21:09:45 -0500 [thread overview]
Message-ID: <1457143790-19422-6-git-send-email-jsimmons@infradead.org> (raw)
In-Reply-To: <1457143790-19422-1-git-send-email-jsimmons@infradead.org>
From: Sebastien Buisson <sbuisson@ddn.com>
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>
---
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;
--
1.7.1
next prev parent reply other threads:[~2016-03-05 2:12 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-05 2:09 [PATCH 00/10] Last batch of fixes for LNet James Simmons
2016-03-05 2:09 ` [PATCH 01/10] staging: lustre: LNet drop rule implementation James Simmons
2016-03-05 7:53 ` kbuild test robot
2016-03-05 2:09 ` [PATCH 02/10] staging: lustre: LNet network latency simulation James Simmons
2016-03-05 2:09 ` [PATCH 03/10] staging: lustre: fix 'data race condition' issue in conrpc.c James Simmons
2016-03-05 2:09 ` [PATCH 04/10] staging: lustre: fix 'NULL pointer dereference' errors James Simmons
2016-03-05 2:09 ` James Simmons [this message]
2016-03-05 2:09 ` [PATCH 06/10] staging: lustre: Correct missing newline James Simmons
2016-03-05 2:09 ` [PATCH 07/10] staging: lustre: add last missing sparse annotation __user James Simmons
2016-03-05 2:55 ` Drokin, Oleg
2016-03-05 2:09 ` [PATCH 08/10] staging: lustre: change test to asser in LNetGetId James Simmons
2016-03-05 2:09 ` [PATCH 09/10] staging: lustre: rename proc_call_handler to lprocfs_call_handler James Simmons
2016-03-05 2:09 ` [PATCH 10/10] staging: lustre: make LNet use lprocfs_call_handler James Simmons
2016-03-05 19:52 ` [PATCH 00/10] Last batch of fixes for LNet Greg Kroah-Hartman
2016-03-07 19:34 ` [lustre-devel] " Simmons, James A.
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1457143790-19422-6-git-send-email-jsimmons@infradead.org \
--to=jsimmons@infradead.org \
--cc=andreas.dilger@intel.com \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lustre-devel@lists.lustre.org \
--cc=oleg.drokin@intel.com \
--cc=sbuisson@ddn.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®