diff options
author | Denis Efremov <yefremov.denis@gmail.com> | 2012-08-18 08:10:31 -0400 |
---|---|---|
committer | Nicholas Bellinger <nab@linux-iscsi.org> | 2012-08-20 17:52:15 -0400 |
commit | 08a16208c8cb2ce1f79fea24f21dd7a8df4f12b6 (patch) | |
tree | 8df3946aff29d4dcbdbddb42296388a3486c1b6e /drivers/target/tcm_fc | |
parent | 6de7145ca3db231a84b7516a6cb25878da6ebb19 (diff) |
tcm_fc: rcu_deref outside rcu lock/unlock section
Use rcu_dereference_protected in order to prevent lockdep
complaint. Sequel of the patch 863555be
Found by Linux Driver Verification project (linuxtesting.org).
Signed-off-by: Denis Efremov <yefremov.denis@gmail.com>
Acked-by: Mark D. Rustad <mark.d.rustad@intel.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Diffstat (limited to 'drivers/target/tcm_fc')
-rw-r--r-- | drivers/target/tcm_fc/tfc_sess.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/target/tcm_fc/tfc_sess.c b/drivers/target/tcm_fc/tfc_sess.c index 87901fa74dd7..3c9e5b57caab 100644 --- a/drivers/target/tcm_fc/tfc_sess.c +++ b/drivers/target/tcm_fc/tfc_sess.c | |||
@@ -456,7 +456,9 @@ static void ft_prlo(struct fc_rport_priv *rdata) | |||
456 | struct ft_tport *tport; | 456 | struct ft_tport *tport; |
457 | 457 | ||
458 | mutex_lock(&ft_lport_lock); | 458 | mutex_lock(&ft_lport_lock); |
459 | tport = rcu_dereference(rdata->local_port->prov[FC_TYPE_FCP]); | 459 | tport = rcu_dereference_protected(rdata->local_port->prov[FC_TYPE_FCP], |
460 | lockdep_is_held(&ft_lport_lock)); | ||
461 | |||
460 | if (!tport) { | 462 | if (!tport) { |
461 | mutex_unlock(&ft_lport_lock); | 463 | mutex_unlock(&ft_lport_lock); |
462 | return; | 464 | return; |