提交 b535d681 编写于 作者: H Heng Qi 提交者: Jakub Kicinski

Revert "bpf: veth driver panics when xdp prog attached before veth_open"

This reverts commit 5e5dc33d.

This patch fixes the panic maked by 2e0de636. Now Paolo
and Toke suggest reverting the patch 2e0de636 and making
it stronger, so do this first.
Signed-off-by: NHeng Qi <hengqi@linux.alibaba.com>
Reviewed-by: NXuan Zhuo <xuanzhuo@linux.alibaba.com>
Signed-off-by: NJakub Kicinski <kuba@kernel.org>
上级 8263ee81
......@@ -1125,7 +1125,7 @@ static int veth_enable_xdp(struct net_device *dev)
int err, i;
rq = &priv->rq[0];
napi_already_on = rcu_access_pointer(rq->napi);
napi_already_on = (dev->flags & IFF_UP) && rcu_access_pointer(rq->napi);
if (!xdp_rxq_info_is_reg(&priv->rq[0].xdp_rxq)) {
err = veth_enable_xdp_range(dev, 0, dev->real_num_rx_queues, napi_already_on);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册