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] [day] [month] [year] [list]
Message-ID: <20200924063621.GA593410@kroah.com>
Date:   Thu, 24 Sep 2020 08:36:21 +0200
From:   Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To:     Matthias Kaehlcke <mka@...omium.org>
Cc:     Rob Herring <robh+dt@...nel.org>,
        Frank Rowand <frowand.list@...il.com>,
        linux-kernel@...r.kernel.org,
        Douglas Anderson <dianders@...omium.org>,
        Alan Stern <stern@...land.harvard.edu>,
        linux-usb@...r.kernel.org, Bastien Nocera <hadess@...ess.net>,
        Krzysztof Kozlowski <krzk@...nel.org>,
        devicetree@...r.kernel.org,
        Ravi Chandra Sadineni <ravisadineni@...omium.org>,
        Peter Chen <peter.chen@....com>,
        Stephen Boyd <swboyd@...omium.org>,
        "Alexander A. Klimov" <grandmaster@...klimov.de>,
        Masahiro Yamada <masahiroy@...nel.org>
Subject: Re: [PATCH v2 2/2] USB: misc: Add onboard_usb_hub driver

On Wed, Sep 23, 2020 at 03:25:45PM -0700, Matthias Kaehlcke wrote:
> On Mon, Sep 21, 2020 at 06:18:37PM -0700, Matthias Kaehlcke wrote:
> > On Sun, Sep 20, 2020 at 04:17:20PM +0200, Greg Kroah-Hartman wrote:
> > > On Thu, Sep 17, 2020 at 11:46:22AM -0700, Matthias Kaehlcke wrote:
> > > >
> > > > ...
> > > >
> > > > +static int __init onboard_hub_init(void)
> > > > +{
> > > > +	int rc;
> > > > +
> > > > +	rc = platform_driver_register(&onboard_hub_driver);
> > > > +	if (rc)
> > > > +		return rc;
> > > > +
> > > > +	return usb_register_device_driver(&onboard_hub_usbdev_driver, THIS_MODULE);
> > > 
> > > No unwinding of the platform driver register if this fails?
> > 
> > Right, will add unwinding.
> > 
> > > And THIS_MODULE should not be needed, did we get the api wrong here?
> > 
> > It seems you suggest to use usb_register() instead, SGTM
> 
> Actually usb_register() is for registering a struct usb_driver, however
> this is a struct usb_device_driver, there doesn't seem to be a
> registration function/macro that doesn't require THIS_MODULE. Please
> provide a pointer if I'm wrong.

You are correct, I was just making a meta-comment that we got this api
wrong when adding it to the kernel and need to fix it up so that you do
not have to manually pass in the module owner.  i.e. make it much like
usb_register() does.

thanks,

greg k-h

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ