Commit 08a16208 authored by Denis Efremov's avatar Denis Efremov Committed by Nicholas Bellinger

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: default avatarDenis Efremov <yefremov.denis@gmail.com>
Acked-by: default avatarMark D. Rustad <mark.d.rustad@intel.com>
Signed-off-by: default avatarNicholas Bellinger <nab@linux-iscsi.org>
parent 6de7145c
......@@ -456,7 +456,9 @@ static void ft_prlo(struct fc_rport_priv *rdata)
struct ft_tport *tport;
mutex_lock(&ft_lport_lock);
tport = rcu_dereference(rdata->local_port->prov[FC_TYPE_FCP]);
tport = rcu_dereference_protected(rdata->local_port->prov[FC_TYPE_FCP],
lockdep_is_held(&ft_lport_lock));
if (!tport) {
mutex_unlock(&ft_lport_lock);
return;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment