Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1228228
| Path | csiph.com!news.mixmin.net!aioe.org!bofh.it!news.nic.it!robomod |
|---|---|
| From | Felipe Balbi <balbi@ti.com> |
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 00/16] usb: gadget: amd5536udc: fix memory leaks |
| Date | Fri, 18 Sep 2015 20:50:02 +0200 |
| Message-ID | <qa8To-2tx-7@gated-at.bofh.it> (permalink) |
| References | <q8DHY-1xe-3@gated-at.bofh.it> |
| X-Original-To | Sudip Mukherjee <sudipm.mukherjee@gmail.com> |
| Reply-To | <balbi@ti.com> |
| MIME-Version | 1.0 |
| Content-Type | multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="SFyWQ0h3ruR435lw" |
| Content-Disposition | inline |
| User-Agent | Mutt/1.5.23 (2014-03-12) |
| Sender | robomod@news.nic.it |
| List-ID | <linux-kernel.vger.kernel.org> |
| X-Mailing-List | linux-kernel@vger.kernel.org |
| Approved | robomod@news.nic.it |
| Lines | 58 |
| Organization | linux.* mail to news gateway |
| X-Original-Cc | Thomas Dahlmann <dahlmann.thomas@arcor.de>, Felipe Balbi <balbi@ti.com>, Greg Kroah-Hartman <gregkh@linuxfoundation.org>, <linux-kernel@vger.kernel.org>, <linux-geode@lists.infradead.org>, <linux-usb@vger.kernel.org> |
| X-Original-Date | Fri, 18 Sep 2015 13:39:54 -0500 |
| X-Original-Message-ID | <20150918183954.GD7636@saruman.tx.rr.com> |
| X-Original-References | <1442243583-24741-1-git-send-email-sudipm.mukherjee@gmail.com> |
| X-Original-Sender | linux-kernel-owner@vger.kernel.org |
| Xref | csiph.com linux.kernel:1228228 |
Show key headers only | View raw
[Multipart message — attachments visible in raw view] - view raw
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
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 00/16] usb: gadget: amd5536udc: fix memory leaks Sudip Mukherjee <sudipm.mukherjee@gmail.com> - 2015-09-14 17:20 +0200
Re: [PATCH 00/16] usb: gadget: amd5536udc: fix memory leaks Felipe Balbi <balbi@ti.com> - 2015-09-18 20:50 +0200
Re: [PATCH 00/16] usb: gadget: amd5536udc: fix memory leaks Sudip Mukherjee <sudipm.mukherjee@gmail.com> - 2015-09-19 06:00 +0200
Re: [PATCH 00/16] usb: gadget: amd5536udc: fix memory leaks Sudip Mukherjee <sudipm.mukherjee@gmail.com> - 2015-09-20 10:20 +0200
Re: [PATCH 00/16] usb: gadget: amd5536udc: fix memory leaks Felipe Balbi <balbi@ti.com> - 2015-09-20 18:20 +0200
Re: [PATCH 00/16] usb: gadget: amd5536udc: fix memory leaks Sudip Mukherjee <sudipm.mukherjee@gmail.com> - 2015-09-21 14:50 +0200
Re: [PATCH 00/16] usb: gadget: amd5536udc: fix memory leaks Felipe Balbi <balbi@ti.com> - 2015-09-21 16:50 +0200
Re: [PATCH 00/16] usb: gadget: amd5536udc: fix memory leaks Felipe Balbi <balbi@ti.com> - 2015-09-20 18:20 +0200
csiph-web