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: <599c254c-035b-33a0-9f32-866ffe644ad5@suse.com>
Date:   Fri, 29 Nov 2019 17:00:58 +0100
From:   Jan Beulich <jbeulich@...e.com>
To:     Paul Durrant <pdurrant@...zon.com>
Cc:     xen-devel@...ts.xenproject.org, linux-block@...r.kernel.org,
        linux-kernel@...r.kernel.org,
        Stefano Stabellini <sstabellini@...nel.org>,
        Boris Ostrovsky <boris.ostrovsky@...cle.com>,
        Juergen Gross <jgross@...e.com>
Subject: Re: [PATCH v2 1/2] xen/xenbus: reference count registered modules

On 29.11.2019 14:43, Paul Durrant wrote:
> To prevent a module being removed whilst attached to a frontend, and

Why only frontend?

> hence xenbus calling into potentially invalid text, take a reference on
> the module before calling the probe() method (dropping it if unsuccessful)
> and drop the reference after returning from the remove() method.
> 
> NOTE: This allows the ad-hoc reference counting in xen-netback to be
>       removed. This will be done in a subsequent patch.
> 
> Suggested-by: Jan Beulich <jbeulich@...e.com>
> Signed-off-by: Paul Durrant <pdurrant@...zon.com>
> 
> --- a/drivers/xen/xenbus/xenbus_probe.c
> +++ b/drivers/xen/xenbus/xenbus_probe.c
> @@ -232,9 +232,11 @@ int xenbus_dev_probe(struct device *_dev)
>  		return err;
>  	}
>  
> +	__module_get(drv->driver.owner);

I guess you really want try_module_get() and deal with it returning
false.

Jan

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ