From: Felipe Balbi <balbi@ti.com>
To: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
Cc: Felipe Balbi <balbi@ti.com>,
Thomas Dahlmann <dahlmann.thomas@arcor.de>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
<linux-kernel@vger.kernel.org>, <linux-geode@lists.infradead.org>,
<linux-usb@vger.kernel.org>
Subject: Re: [PATCH 00/16] usb: gadget: amd5536udc: fix memory leaks
Date: Sun, 20 Sep 2015 11:16:55 -0500 [thread overview]
Message-ID: <20150920161655.GC1447@saruman.tx.rr.com> (raw)
In-Reply-To: <20150919035438.GA666@sudip-pc>
[-- Attachment #1: Type: text/plain, Size: 1818 bytes --]
Hi,
On Sat, Sep 19, 2015 at 09:24:38AM +0530, Sudip Mukherjee wrote:
> On Fri, Sep 18, 2015 at 01:39:54PM -0500, Felipe Balbi wrote:
> > 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
> I know checkpatch gives warning on some of my patches but as the warning
> was not related to the part I have modified so I have not done any thing
> with them as they will become unrelated changes than what is mentioned
> in the commit log.
> Anyways, I will fix up all the warnings and send v2. But do you want me
> to also fix the checkpatch warnings in those patch where functions are
> rearranged? Because in those patches functions were just moved and there
> was no change in the body of the function.
sure, just add a note "while at that, also fix checkpatch warnings"
--
balbi
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
prev parent reply other threads:[~2015-09-20 16:17 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-14 15:12 [PATCH 00/16] usb: gadget: amd5536udc: fix memory leaks Sudip Mukherjee
2015-09-14 15:12 ` [PATCH 01/16] usb: gadget: amd5536udc: introduce free_dma_pools Sudip Mukherjee
2015-09-14 15:12 ` [PATCH 02/16] usb: gadget: amd5536udc: rewrite init_dma_pools Sudip Mukherjee
2015-09-14 15:12 ` [PATCH 03/16] usb: gadget: amd5536udc: rewrite udc_pci_probe Sudip Mukherjee
2015-09-14 15:12 ` [PATCH 04/16] usb: gadget: amd5536udc: use WARN_ON Sudip Mukherjee
2015-09-14 15:12 ` [PATCH 05/16] usb: gadget: amd5536udc: use free_dma_pools Sudip Mukherjee
2015-09-14 15:12 ` [PATCH 06/16] usb: gadget: amd5536udc: remove unnecessary conditions Sudip Mukherjee
2015-09-14 15:12 ` [PATCH 07/16] usb: gadget: amd5536udc: unmap virt_addr Sudip Mukherjee
2015-09-14 15:12 ` [PATCH 08/16] usb: gadget: amd5536udc: remove forward declaration of udc_probe Sudip Mukherjee
2015-09-14 15:12 ` [PATCH 09/16] usb: gadget: amd5536udc: remove forward declaration of udc_remote_wakeup Sudip Mukherjee
2015-09-14 15:12 ` [PATCH 10/16] usb: gadget: amd5536udc: remove forward declaration of udc_create_dma_chain Sudip Mukherjee
2015-09-14 15:12 ` [PATCH 11/16] usb: gadget: amd5536udc: remove forward declaration of udc_free_dma_chain Sudip Mukherjee
2015-09-14 15:12 ` [PATCH 12/16] usb: gadget: amd5536udc: remove forward declaration of udc_pci_* Sudip Mukherjee
2015-09-14 15:13 ` [PATCH 13/16] usb: gadget: amd5536udc: remove forward declaration of udc_basic_init Sudip Mukherjee
2015-09-14 15:13 ` [PATCH 14/16] usb: gadget: amd5536udc: NULL comparison Sudip Mukherjee
2015-09-14 15:13 ` [PATCH 15/16] usb: gadget: amd5536udc: remove multiple blank lines Sudip Mukherjee
2015-09-14 15:13 ` [PATCH 16/16] usb: gadget: amd5536udc: match alignment Sudip Mukherjee
2015-09-18 18:39 ` [PATCH 00/16] usb: gadget: amd5536udc: fix memory leaks Felipe Balbi
2015-09-19 3:54 ` Sudip Mukherjee
2015-09-20 8:12 ` Sudip Mukherjee
2015-09-20 16:17 ` Felipe Balbi
2015-09-21 12:48 ` Sudip Mukherjee
2015-09-21 14:42 ` Felipe Balbi
2015-09-20 16:16 ` Felipe Balbi [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20150920161655.GC1447@saruman.tx.rr.com \
--to=balbi@ti.com \
--cc=dahlmann.thomas@arcor.de \
--cc=gregkh@linuxfoundation.org \
--cc=linux-geode@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=sudipm.mukherjee@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox