On Tue, 15 Oct 2024 at 05:06, Mike Christie <michael.chris...@oracle.com> wrote: > > On 10/3/24 8:58 PM, Cindy Lu wrote: > > +static void vhost_workers_free(struct vhost_dev *dev) > > +{ > > + if (enforce_inherit_owner) > > + vhost_workers_free_task(dev); > > + else > > + vhost_workers_free_kthread(dev); > > +} > > With patch 7, userspace could change enforce_inherit_owner after > we created thread and we would call the wrong function above. > enforce_inherit_owner will only change before the owner was set. the process is like set enforce_inherit_owner---->set owner-> thread/task creating in in patch 7's code I have add the check for vhost's owner, if the owner was set, the ioctl to set enforce_inherit_owner will fail Thanks Cindy
- Re: [PATCH v2 1/7] vhost: Add a new modparam t... Jason Wang
- Re: [PATCH v2 1/7] vhost: Add a new modpar... Stefano Garzarella
- Re: [PATCH v2 1/7] vhost: Add a new mo... Jason Wang
- Re: [PATCH v2 1/7] vhost: Add a n... Cindy Lu
- Re: [PATCH v2 1/7] vhost: Add a new modparam t... Cindy Lu
- [PATCH v2 2/7] vhost: Add kthread support in function v... Cindy Lu
- [PATCH v2 3/7] vhost: Add kthread support in function v... Cindy Lu
- Re: [PATCH v2 3/7] vhost: Add kthread support in f... Stefano Garzarella
- Re: [PATCH v2 3/7] vhost: Add kthread support in f... Mike Christie
- Re: [PATCH v2 3/7] vhost: Add kthread support ... Cindy Lu
- Re: [PATCH v2 3/7] vhost: Add kthread supp... Stefano Garzarella
- [PATCH v2 4/7] vhost: Add the vhost_worker to support k... Cindy Lu
- [PATCH v2 5/7] vhost: Add the cgroup related function Cindy Lu
- [PATCH v2 6/7] vhost: Add kthread support in function v... Cindy Lu
- [PATCH v2 7/7] vhost: Add new UAPI to support change to... Cindy Lu