diff options
author | Rémi Denis-Courmont <remi.denis-courmont@nokia.com> | 2009-11-16 17:17:24 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-11-17 07:08:50 -0500 |
commit | b2a5decddbe295d09c29d4a8078cdc47a55346df (patch) | |
tree | 5084b846548a1cc8d3ce1ecd91f496b9a8b39193 | |
parent | 115924b6bdc7cc6bf7da5b933b09281e1f4e17a9 (diff) |
Phonet: missing rcu_dereference()
Reported-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Signed-off-by: Rémi Denis-Courmont <remi.denis-courmont@nokia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | net/phonet/af_phonet.c | 2 |
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(); |