diff options
author | Mark Rustad <mark.d.rustad@intel.com> | 2012-06-26 18:57:30 -0400 |
---|---|---|
committer | Nicholas Bellinger <nab@linux-iscsi.org> | 2012-07-06 15:52:09 -0400 |
commit | 863555be0c81558b1af277addcf68acb8f778860 (patch) | |
tree | 5fd9df950b9397f1b265d20a53fbd9bec72ef4d9 /drivers/target | |
parent | 5134de2815ac723ecfba4a1c7b2a90fa4d8dcfd9 (diff) |
tcm_fc: Resolve suspicious RCU usage warnings
Use rcu_dereference_protected to tell rcu that the ft_lport_lock
is held during ft_lport_create. This resolved "suspicious RCU usage"
warnings when debugging options are turned on.
Signed-off-by: Mark Rustad <mark.d.rustad@intel.com>
Tested-by: Ross Brattain <ross.b.brattain@intel.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Diffstat (limited to 'drivers/target')
-rw-r--r-- | drivers/target/tcm_fc/tfc_sess.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/target/tcm_fc/tfc_sess.c b/drivers/target/tcm_fc/tfc_sess.c index cb99da920068..87901fa74dd7 100644 --- a/drivers/target/tcm_fc/tfc_sess.c +++ b/drivers/target/tcm_fc/tfc_sess.c | |||
@@ -58,7 +58,8 @@ static struct ft_tport *ft_tport_create(struct fc_lport *lport) | |||
58 | struct ft_tport *tport; | 58 | struct ft_tport *tport; |
59 | int i; | 59 | int i; |
60 | 60 | ||
61 | tport = rcu_dereference(lport->prov[FC_TYPE_FCP]); | 61 | tport = rcu_dereference_protected(lport->prov[FC_TYPE_FCP], |
62 | lockdep_is_held(&ft_lport_lock)); | ||
62 | if (tport && tport->tpg) | 63 | if (tport && tport->tpg) |
63 | return tport; | 64 | return tport; |
64 | 65 | ||