diff options
author | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2012-09-05 07:57:19 +0200 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2012-09-05 07:57:19 +0200 |
commit | e6c340171f0daaccc95b90abbeed2b837157ee11 (patch) | |
tree | 843d4035be59bd791321910e52157ce527b3b4b3 /drivers/target/tcm_fc/tfc_sess.c | |
parent | Input: tegra - move platform data header (diff) | |
parent | Linux 3.6-rc4 (diff) | |
download | linux-e6c340171f0daaccc95b90abbeed2b837157ee11.tar.xz linux-e6c340171f0daaccc95b90abbeed2b837157ee11.zip |
Merge tag 'v3.6-rc4' into next
Linux 3.6-rc4
# gpg: Signature made Sat 01 Sep 2012 10:40:33 AM PDT using RSA key ID 00411886
# gpg: Good signature from "Linus Torvalds <torvalds@linux-foundation.org>"
Diffstat (limited to 'drivers/target/tcm_fc/tfc_sess.c')
-rw-r--r-- | drivers/target/tcm_fc/tfc_sess.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/target/tcm_fc/tfc_sess.c b/drivers/target/tcm_fc/tfc_sess.c index cb99da920068..3c9e5b57caab 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) struct ft_tport *tport; int i; - tport = rcu_dereference(lport->prov[FC_TYPE_FCP]); + tport = rcu_dereference_protected(lport->prov[FC_TYPE_FCP], + lockdep_is_held(&ft_lport_lock)); if (tport && tport->tpg) return tport; @@ -455,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; |