]> Pileus Git - ~andy/linux/blobdiff - net/phonet/af_phonet.c
Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4
[~andy/linux] / net / phonet / af_phonet.c
index ed65da251b6a70e016de7343299799dfa31781f7..526d0273991a5c99ee2bb2e664bf394640f7a25f 100644 (file)
@@ -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();