lkml.org 
[lkml]   [2022]   [Jan]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH] virtio: acknowledge all features before access
Date
On Mon, Jan 17 2022, "Michael S. Tsirkin" <mst@redhat.com> wrote:

> On Mon, Jan 17, 2022 at 02:31:49PM +0800, Jason Wang wrote:
>>
>> 在 2022/1/15 上午4:09, Michael S. Tsirkin 写道:
>> > @@ -495,6 +494,10 @@ int virtio_device_restore(struct virtio_device *dev)
>> > /* We have a driver! */
>> > virtio_add_status(dev, VIRTIO_CONFIG_S_DRIVER);
>> > + ret = dev->config->finalize_features(dev);
>> > + if (ret)
>> > + goto err;
>>
>>
>> Is this part of code related?
>>
>> Thanks
>>
>
> Yes. virtio_finalize_features no longer calls dev->config->finalize_features.
>
> I think the dev->config->finalize_features callback is actually
> a misnomer now, it just sends the features to device,
> finalize is FEATURES_OK. Renaming that is a bigger
> patch though, and I'd like this one to be cherry-pickable
> to stable.

Do we want to add a comment before the calls to ->finalize_features()
(/* write features to device */) and adapt the comment in virtio_ring.h?
Should still be stable-friendly, and giving the callback a better name
can be a follow-up patch.

>
>> > +
>> > ret = virtio_finalize_features(dev);
>> > if (ret)
>> > goto err;

\
 
 \ /
  Last update: 2022-01-17 13:41    [W:0.092 / U:0.896 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site