Commit b2a5decd authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont Committed by David S. Miller

Phonet: missing rcu_dereference()

Reported-by: default avatarPaul E. McKenney <paulmck@linux.vnet.ibm.com>
Signed-off-by: default avatarRémi Denis-Courmont <remi.denis-courmont@nokia.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 115924b6
...@@ -44,7 +44,7 @@ static struct phonet_protocol *phonet_proto_get(int protocol) ...@@ -44,7 +44,7 @@ static struct phonet_protocol *phonet_proto_get(int protocol)
return NULL; return NULL;
rcu_read_lock(); rcu_read_lock();
pp = proto_tab[protocol]; pp = rcu_dereference(proto_tab[protocol]);
if (pp && !try_module_get(pp->prot->owner)) if (pp && !try_module_get(pp->prot->owner))
pp = NULL; pp = NULL;
rcu_read_unlock(); rcu_read_unlock();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment