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]
Date:   Tue, 3 Dec 2019 10:47:55 +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 v3 1/2] xen/xenbus: reference count registered modules

On 02.12.2019 12:41, Paul Durrant wrote:
> To prevent a PV driver module being removed whilst attached to its other
> end, and 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.
> 
> Suggested-by: Jan Beulich <jbeulich@...e.com>
> Signed-off-by: Paul Durrant <pdurrant@...zon.com>

Reviewed-by: Jan Beulich <jbeulich@...e.com>
with ...

> --- a/drivers/xen/xenbus/xenbus_probe.c
> +++ b/drivers/xen/xenbus/xenbus_probe.c
> @@ -232,9 +232,16 @@ int xenbus_dev_probe(struct device *_dev)
>  		return err;
>  	}
>  
> +	if (!try_module_get(drv->driver.owner)) {
> +		dev_warn(&dev->dev, "failed to acquire module reference on '%s'.\n",
> +			 drv->driver.name);

... perhaps the full stop dropped here and ...

> +		err = -ESRCH;
> +		goto fail;
> +        }

... (definitely) indentation here changed to use a tab.

Jan

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ