diff mbox

[net-next] Phonet: missing rcu_dereference()

Message ID 1258445844-6079-1-git-send-email-remi@remlab.net
State Accepted, archived
Delegated to: David Miller
Headers show

Commit Message

Rémi Denis-Courmont Nov. 17, 2009, 8:17 a.m. UTC
From: Rémi Denis-Courmont <remi.denis-courmont@nokia.com>

Reported-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Signed-off-by: Rémi Denis-Courmont <remi.denis-courmont@nokia.com>
---
 net/phonet/af_phonet.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Comments

David Miller Nov. 17, 2009, 12:09 p.m. UTC | #1
From: Rémi Denis-Courmont <remi@remlab.net>
Date: Tue, 17 Nov 2009 10:17:24 +0200

> From: Rémi Denis-Courmont <remi.denis-courmont@nokia.com>
> 
> Reported-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
> Signed-off-by: Rémi Denis-Courmont <remi.denis-courmont@nokia.com>

Applied, thank you.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/net/phonet/af_phonet.c b/net/phonet/af_phonet.c
index ed65da2..526d027 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)
 		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();