Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e71895a1 authored by Eric Dumazet's avatar Eric Dumazet Committed by David S. Miller
Browse files

xfrm: dont assume rcu_read_lock in xfrm_output_one()



ip_local_out() is called with rcu_read_lock() held from ip_queue_xmit()
but not from other call sites.

Reported-and-bisected-by: default avatarNick Bowler <nbowler@elliptictech.com>
Signed-off-by: default avatarEric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 801e147c
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -101,7 +101,7 @@ static int xfrm_output_one(struct sk_buff *skb, int err)
			err = -EHOSTUNREACH;
			err = -EHOSTUNREACH;
			goto error_nolock;
			goto error_nolock;
		}
		}
		skb_dst_set_noref(skb, dst);
		skb_dst_set(skb, dst_clone(dst));
		x = dst->xfrm;
		x = dst->xfrm;
	} while (x && !(x->outer_mode->flags & XFRM_MODE_FLAG_TUNNEL));
	} while (x && !(x->outer_mode->flags & XFRM_MODE_FLAG_TUNNEL));