提交 291aeb2b 编写于 作者: J Jason Wang 提交者: David S. Miller

tuntap: enable bh early during processing XDP

This patch move the bh enabling a little bit earlier, this will be
used for factoring out the core XDP logic of tuntap.
Acked-by: NMichael S. Tsirkin <mst@redhat.com>
Signed-off-by: NJason Wang <jasowang@redhat.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 4f23aff8
......@@ -1726,22 +1726,18 @@ static struct sk_buff *tun_build_skb(struct tun_struct *tun,
goto err_xdp;
}
}
rcu_read_unlock();
local_bh_enable();
skb = build_skb(buf, buflen);
if (!skb) {
rcu_read_unlock();
local_bh_enable();
if (!skb)
return ERR_PTR(-ENOMEM);
}
skb_reserve(skb, pad - delta);
skb_put(skb, len);
get_page(alloc_frag->page);
alloc_frag->offset += buflen;
rcu_read_unlock();
local_bh_enable();
return skb;
err_redirect:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册