Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 34218ccb authored by Xianting Tian's avatar Xianting Tian Committed by Greg Kroah-Hartman
Browse files

virtio_net: Remove BUG() to avoid machine dead



[ Upstream commit 85eb1389458d134bdb75dad502cc026c3753a619 ]

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: default avatarXianting Tian <xianting.tian@linux.alibaba.com>
Reviewed-by: default avatarLeon Romanovsky <leonro@nvidia.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent c9a064cf
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1550,7 +1550,7 @@ static int xmit_skb(struct send_queue *sq, struct sk_buff *skb)
	if (virtio_net_hdr_from_skb(skb, &hdr->hdr,
				    virtio_is_little_endian(vi->vdev), false,
				    0))
		BUG();
		return -EPROTO;

	if (vi->mergeable_rx_bufs)
		hdr->num_buffers = 0;