Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c206f8bc authored by Sebastien Buisson's avatar Sebastien Buisson Committed by Greg Kroah-Hartman
Browse files

staging: lustre: fix 'data race condition' issue in conrpc.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: default avatarSebastien Buisson <sbuisson@ddn.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-2744
Reviewed-on: http://review.whamcloud.com/6567


Reviewed-by: default avatarLiang Zhen <liang.zhen@intel.com>
Reviewed-by: default avatarDmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: default avatarOleg Drokin <oleg.drokin@intel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent b7acfc95
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -945,9 +945,13 @@ lstcon_sesnew_stat_reply(lstcon_rpc_trans_t *trans,
		return status;

	if (!trans->tas_feats_updated) {
		spin_lock(&console_session.ses_rpc_lock);
		if (!trans->tas_feats_updated) { /* recheck with lock */
			trans->tas_feats_updated = 1;
			trans->tas_features = reply->msg_ses_feats;
		}
		spin_unlock(&console_session.ses_rpc_lock);
	}

	if (reply->msg_ses_feats != trans->tas_features) {
		CNETERR("Framework features %x from %s is different with features on this transaction: %x\n",