提交 bb626c18 编写于 作者: X Xie Yongji 提交者: Yang Yingliang

virtio_net: Fix error handling in virtnet_restore()

stable inclusion
from linux-4.19.198
commit 845ae8523f5a9ecfdbed48b485cb4ffae71df95b

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

[ Upstream commit 3f2869ca ]

Do some cleanups in virtnet_restore() when virtnet_cpu_notif_add() failed.
Signed-off-by: NXie Yongji <xieyongji@bytedance.com>
Link: https://lore.kernel.org/r/20210517084516.332-1-xieyongji@bytedance.comAcked-by: NJason Wang <jasowang@redhat.com>
Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
Signed-off-by: NSasha Levin <sashal@kernel.org>
Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
上级 4492e247
...@@ -3185,8 +3185,11 @@ static __maybe_unused int virtnet_restore(struct virtio_device *vdev) ...@@ -3185,8 +3185,11 @@ static __maybe_unused int virtnet_restore(struct virtio_device *vdev)
virtnet_set_queues(vi, vi->curr_queue_pairs); virtnet_set_queues(vi, vi->curr_queue_pairs);
err = virtnet_cpu_notif_add(vi); err = virtnet_cpu_notif_add(vi);
if (err) if (err) {
virtnet_freeze_down(vdev);
remove_vq_common(vi);
return err; return err;
}
return 0; return 0;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册