提交 fb2ff7dd 编写于 作者: X Xianting Tian 提交者: Yang Yingliang

virtio_net: Remove BUG() to avoid machine dead

stable inclusion
from linux-4.19.198
commit 34218ccb387c1e5e94b2baa6e337fb0367edede0

--------------------------------

[ Upstream commit 85eb1389 ]

We should not directly BUG() when there is hdr error, it is
better to output a print when such error happens. Currently,
the caller of xmit_skb() already did it.
Signed-off-by: NXianting Tian <xianting.tian@linux.alibaba.com>
Reviewed-by: NLeon Romanovsky <leonro@nvidia.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
Signed-off-by: NSasha Levin <sashal@kernel.org>
Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
上级 38cb5d45
...@@ -1536,7 +1536,7 @@ static int xmit_skb(struct send_queue *sq, struct sk_buff *skb) ...@@ -1536,7 +1536,7 @@ static int xmit_skb(struct send_queue *sq, struct sk_buff *skb)
if (virtio_net_hdr_from_skb(skb, &hdr->hdr, if (virtio_net_hdr_from_skb(skb, &hdr->hdr,
virtio_is_little_endian(vi->vdev), false, virtio_is_little_endian(vi->vdev), false,
0)) 0))
BUG(); return -EPROTO;
if (vi->mergeable_rx_bufs) if (vi->mergeable_rx_bufs)
hdr->num_buffers = 0; hdr->num_buffers = 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册