mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-24 04:34:08 +08:00
Revert "bpf: veth driver panics when xdp prog attached before veth_open"
This reverts commit5e5dc33d5d
. This patch fixes the panic maked by2e0de6366a
. Now Paolo and Toke suggest reverting the patch2e0de6366a
and making it stronger, so do this first. Signed-off-by: Heng Qi <hengqi@linux.alibaba.com> Reviewed-by: Xuan Zhuo <xuanzhuo@linux.alibaba.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
parent
8263ee81f6
commit
b535d681ad
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user