]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
virtio: reenable config if freezing device failed
authorDavid Hildenbrand <david@redhat.com>
Tue, 13 Feb 2024 13:54:25 +0000 (14:54 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 3 Apr 2024 13:28:36 +0000 (15:28 +0200)
commit3d26a2d801819bea2d49076a24835e3a34ae1cdd
tree5c072e94e1b8d03c0afd9d1d9328dd9c8020ee6c
parent8a2e2336b8cf8ba9bfb0d1e8841b51672c9f6538
virtio: reenable config if freezing device failed

[ Upstream commit 310227f42882c52356b523e2f4e11690eebcd2ab ]

Currently, we don't reenable the config if freezing the device failed.

For example, virtio-mem currently doesn't support suspend+resume, and
trying to freeze the device will always fail. Afterwards, the device
will no longer respond to resize requests, because it won't get notified
about config changes.

Let's fix this by re-enabling the config if freezing fails.

Fixes: 22b7050a024d ("virtio: defer config changed notifications")
Cc: <stable@kernel.org>
Cc: "Michael S. Tsirkin" <mst@redhat.com>
Cc: Jason Wang <jasowang@redhat.com>
Cc: Xuan Zhuo <xuanzhuo@linux.alibaba.com>
Signed-off-by: David Hildenbrand <david@redhat.com>
Message-Id: <20240213135425.795001-1-david@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/virtio/virtio.c