aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--net/phonet/af_phonet.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/phonet/af_phonet.c b/net/phonet/af_phonet.c
index ed65da251b6a..526d0273991a 100644
--- a/net/phonet/af_phonet.c
+++ b/net/phonet/af_phonet.c
@@ -44,7 +44,7 @@ static struct phonet_protocol *phonet_proto_get(int protocol)
44 return NULL; 44 return NULL;
45 45
46 rcu_read_lock(); 46 rcu_read_lock();
47 pp = proto_tab[protocol]; 47 pp = rcu_dereference(proto_tab[protocol]);
48 if (pp && !try_module_get(pp->prot->owner)) 48 if (pp && !try_module_get(pp->prot->owner))
49 pp = NULL; 49 pp = NULL;
50 rcu_read_unlock(); 50 rcu_read_unlock();