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: <VI1PR0401MB263867BC07019BCAC48ABCE08D870@VI1PR0401MB2638.eurprd04.prod.outlook.com>
Date:   Fri, 9 Dec 2016 15:53:27 +0000
From:   Stuart Yoder <stuart.yoder@....com>
To:     Greg KH <gregkh@...uxfoundation.org>
CC:     "devel@...verdev.osuosl.org" <devel@...verdev.osuosl.org>,
        "arnd@...db.de" <arnd@...db.de>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "agraf@...e.de" <agraf@...e.de>, Leo Li <leoyang.li@....com>,
        Catalin Horghidan <catalin.horghidan@....com>,
        "Ioana Ciornei" <ioana.ciornei@....com>,
        Laurentiu Tudor <laurentiu.tudor@....com>
Subject: RE: [PATCH v3 1/9] staging: fsl-mc: move bus driver out of staging

> > > Where is the device freed?  I see you trying to do some "odd" stuff in
> > > fsl_mc_device_remove() by deleting and then putting a device structure.
> > > I can't find a "release()" callback anywhere for your bus, where is it?
> > >
> > > What happens when the reference count falls to 0 for your struct device?
> >
> > Hrm...something seems wrong in free path, and I think this needs to
> > be refactored.
> >
> > IIRC, when German (former maintainer) wrote that code he loosely based
> > it on the register/unregister platform bus code:
> >
> > int platform_device_register(struct platform_device *pdev)
> > {
> >         device_initialize(&pdev->dev);
> >         arch_setup_pdev_archdata(pdev);
> >         return platform_device_add(pdev);
> > }
> > void platform_device_unregister(struct platform_device *pdev)
> > {
> >         platform_device_del(pdev);
> >         platform_device_put(pdev);
> > }
> >
> > ...I'm puzzling over how that code handles a refcount of zero
> > as I see no 'release' callback anywhere, but I must be missing
> > something.
> >
> > In any case, we'll get this refactored.
> 
> Have you tried removing a device?  The kernel should complain loudly
> about there not being a release function for your device.

Yes, device removal has been working from day 1.  A brief look
seems to indicate that the ref count never goes to zero, which
needs to be debugged.

Thanks,
Stuart

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ