lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <782e9d35-99be-b77e-73f7-3291e03d6fe6@redhat.com>
Date:   Tue, 25 May 2021 14:10:32 +0800
From:   Jason Wang <jasowang@...hat.com>
To:     Xie Yongji <xieyongji@...edance.com>, mst@...hat.com
Cc:     virtualization@...ts.linux-foundation.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] virtio_net: Fix error handling in virtnet_restore()


在 2021/5/17 下午4:45, Xie Yongji 写道:
> Do some cleanups in virtnet_restore() when virtnet_cpu_notif_add() failed.
>
> Signed-off-by: Xie Yongji <xieyongji@...edance.com>


Acked-by: Jason Wang <jasowang@...hat.com>


> ---
>   drivers/net/virtio_net.c | 5 ++++-
>   1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c
> index 7be93ca01650..5ca7d6780add 100644
> --- a/drivers/net/virtio_net.c
> +++ b/drivers/net/virtio_net.c
> @@ -3250,8 +3250,11 @@ static __maybe_unused int virtnet_restore(struct virtio_device *vdev)
>   	virtnet_set_queues(vi, vi->curr_queue_pairs);
>   
>   	err = virtnet_cpu_notif_add(vi);
> -	if (err)
> +	if (err) {
> +		virtnet_freeze_down(vdev);
> +		remove_vq_common(vi);
>   		return err;
> +	}
>   
>   	return 0;
>   }

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ