Skip to content

Commit

Permalink
Phonet: missing rcu_dereference()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Rémi Denis-Courmont authored and David S. Miller committed Nov 17, 2009
1 parent 115924b commit b2a5dec
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/phonet/af_phonet.c
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit b2a5dec

Please sign in to comment.