Skip to contentSkip to conversation

Phonet: missing rcu_dereference()

PATCH Applied Rémi Denis-Courmont 2 participants 2 messages Nov 17, 2009

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Phonet: missing rcu_dereference()

From: Rémi Denis-Courmont <[email protected]>

---
 net/phonet/af_phonet.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
net/phonet/af_phonet.c +1 -1
index ed65da2..526d027 100644
@@ -44,7 +44,7 @@ static struct phonet_protocol *phonet_proto_get(int protocol)
 		return NULL;
 
 	rcu_read_lock();
-	pp = proto_tab[protocol];
+	pp = rcu_dereference(proto_tab[protocol]);
 	if (pp && !try_module_get(pp->prot->owner))
 		pp = NULL;
 	rcu_read_unlock();
Signature · 1 line
1.6.3.3