From: Paul E. McKenney Date: Wed, 17 Aug 2005 19:05:27 +0000 (-0700) Subject: [DECNET]: Fix RCU race condition in dn_neigh_construct(). X-Git-Tag: firefly_0821_release~42315^2 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=1f07247de51efd30c88ad8e3e06a8b5382fc7d35;p=firefly-linux-kernel-4.4.55.git [DECNET]: Fix RCU race condition in dn_neigh_construct(). Signed-off-by: Paul E. McKenney Signed-off-by: David S. Miller --- diff --git a/net/decnet/dn_neigh.c b/net/decnet/dn_neigh.c index f32dba9e26fe..8d0cc3cf3e49 100644 --- a/net/decnet/dn_neigh.c +++ b/net/decnet/dn_neigh.c @@ -148,12 +148,12 @@ static int dn_neigh_construct(struct neighbour *neigh) __neigh_parms_put(neigh->parms); neigh->parms = neigh_parms_clone(parms); - rcu_read_unlock(); if (dn_db->use_long) neigh->ops = &dn_long_ops; else neigh->ops = &dn_short_ops; + rcu_read_unlock(); if (dn->flags & DN_NDFLAG_P3) neigh->ops = &dn_phase3_ops;