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:	Fri, 18 Sep 2015 13:39:54 -0500
From:	Felipe Balbi <balbi@...com>
To:	Sudip Mukherjee <sudipm.mukherjee@...il.com>
CC:	Thomas Dahlmann <dahlmann.thomas@...or.de>,
	Felipe Balbi <balbi@...com>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	<linux-kernel@...r.kernel.org>, <linux-geode@...ts.infradead.org>,
	<linux-usb@...r.kernel.org>
Subject: Re: [PATCH 00/16] usb: gadget: amd5536udc: fix memory leaks

On Mon, Sep 14, 2015 at 08:42:47PM +0530, Sudip Mukherjee wrote:
> This amd5536udc was a complete mess. The major problems that i could
> find are:
> 
> 1) if udc_pci_probe() fails in any stage then it just calls the
> udc_pci_remove() to handle error. And udc_pci_remove() works with
> struct udc *dev which we get from pci_get_drvdata(pdev). But we do the
> pci_set_drvdata(pdev, dev) almost at the end of probe. So basically
> incase of error we are handling the error by dereferencing a NULL
> pointer.
> 
> 2) udc_pci_remove() does a BUG_ON(dev->driver != NULL) and dev->driver
> will be set only if probe is success. So that means if probe fails then
> probe will call udc_pci_remove() for error handling and udc_pci_remove()
> will inturn halts the kernel by calling BUG().
> 
> And apart from these numerous memory leaks and not releasing of
> resources. Here comes a rewrite of few of the functions in an
> attempt to fix these.

run checkpatch.pl and try again

-- 
balbi

Download attachment "signature.asc" of type "application/pgp-signature" (820 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ