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] [thread-next>] [day] [month] [year] [list]
Message-ID: <406479e4-a4f8-63f3-38f5-b1c3bb6e31ab@redhat.com>
Date:   Tue, 26 Jan 2021 16:09:47 +0800
From:   Jason Wang <jasowang@...hat.com>
To:     Xie Yongji <xieyongji@...edance.com>, mst@...hat.com,
        stefanha@...hat.com, sgarzare@...hat.com, parav@...dia.com,
        bob.liu@...cle.com, hch@...radead.org, rdunlap@...radead.org,
        willy@...radead.org, viro@...iv.linux.org.uk, axboe@...nel.dk,
        bcrl@...ck.org, corbet@....net
Cc:     virtualization@...ts.linux-foundation.org, netdev@...r.kernel.org,
        kvm@...r.kernel.org, linux-aio@...ck.org,
        linux-fsdevel@...r.kernel.org
Subject: Re: [RFC v3 10/11] vduse: grab the module's references until there is
 no vduse device


On 2021/1/19 下午1:07, Xie Yongji wrote:
> The module should not be unloaded if any vduse device exists.
> So increase the module's reference count when creating vduse
> device. And the reference count is kept until the device is
> destroyed.
>
> Signed-off-by: Xie Yongji <xieyongji@...edance.com>


Looks like a bug fix. If yes, let's squash this into patch 8.

Thanks


> ---
>   drivers/vdpa/vdpa_user/vduse_dev.c | 2 ++
>   1 file changed, 2 insertions(+)
>
> diff --git a/drivers/vdpa/vdpa_user/vduse_dev.c b/drivers/vdpa/vdpa_user/vduse_dev.c
> index 4d21203da5b6..003aeb281bce 100644
> --- a/drivers/vdpa/vdpa_user/vduse_dev.c
> +++ b/drivers/vdpa/vdpa_user/vduse_dev.c
> @@ -978,6 +978,7 @@ static int vduse_destroy_dev(u32 id)
>   	kfree(dev->vqs);
>   	vduse_domain_destroy(dev->domain);
>   	vduse_dev_destroy(dev);
> +	module_put(THIS_MODULE);
>   
>   	return 0;
>   }
> @@ -1022,6 +1023,7 @@ static int vduse_create_dev(struct vduse_dev_config *config)
>   
>   	dev->connected = true;
>   	list_add(&dev->list, &vduse_devs);
> +	__module_get(THIS_MODULE);
>   
>   	return fd;
>   err_fd:

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ