Subject: Re: [PATCH v2 net 2/2] net: core: generic XDP support for stacked device

From: Stephen Hemminger <[email-masked]>
Date: Tue, 21 May 2019 07:45:53 -0700

On Tue, 21 May 2019 08:15:36 +0200
Jiri Pirko <[email-masked]> wrote:

> +	if (static_branch_unlikely(&generic_xdp_needed_key)) {
> +		int ret2;
> +
> +		preempt_disable();
> +		rcu_read_lock();
> +		ret2 = do_xdp_generic(rcu_dereference(skb->dev->xdp_prog), skb);
> +		rcu_read_unlock();
> +		preempt_enable();
> +
> +		if (ret2 != XDP_PASS)
> +			return NET_RX_DROP;
> +	}
> +

rcu_read_lock is already held by callers of __netif_receive_skb_core