From: Saurabh Sengar <saurabh.truth@gmail.com>
To: Greg KH <gregkh@linuxfoundation.org>
Cc: mathias.nyman@intel.com, linux-usb@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] usb: host: pci_quirks: fix memory leak, by adding iounmap
Date: Fri, 4 Dec 2015 22:01:54 +0530 [thread overview]
Message-ID: <CAA8avJ_8KELR1Ju=NLAs6wUVEtYUkkK+B90xjDOUAJaVn6n0dA@mail.gmail.com> (raw)
In-Reply-To: <20151204162314.GA31475@kroah.com>
On 4 December 2015 at 21:53, Greg KH <gregkh@linuxfoundation.org> wrote:
> On Wed, Dec 02, 2015 at 10:51:37PM +0530, Saurabh Sengar wrote:
>> added iounmap inorder to free memory mapped to base before returning
>>
>> Signed-off-by: Saurabh Sengar <saurabh.truth@gmail.com>
>> ---
>> v2: changed logic a bit, because of recent patches pushed to usb-next
>> drivers/usb/host/pci-quirks.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/usb/host/pci-quirks.c b/drivers/usb/host/pci-quirks.c
>> index 26cb8c8..2ac198c 100644
>> --- a/drivers/usb/host/pci-quirks.c
>> +++ b/drivers/usb/host/pci-quirks.c
>> @@ -992,7 +992,7 @@ static void quirk_usb_handoff_xhci(struct pci_dev *pdev)
>> if ((ext_cap_offset + sizeof(val)) > len) {
>> /* We're reading garbage from the controller */
>> dev_warn(&pdev->dev, "xHCI controller failing to respond");
>> - return;
>> + goto hc_init;
>
> Are you sure this is correct? That goto location then does a whole
> bunch of things with the xhci controller that you just now determined is
> failing to respond. I can't take this as-is, sorry.
>
> greg k-h
Yes I agree, and in the first patch I didn't do this way.
But the latest patch which got introduced is doing "goto hc_init" at line 990
ext_cap_offset = xhci_find_next_ext_cap(base, 0, XHCI_EXT_CAPS_LEGACY);
if (!ext_cap_offset)
goto hc_init;
I think this is wrong too, may be I am wrong.
Any way I will send the first patch again on top of usb-next as v3
next prev parent reply other threads:[~2015-12-04 16:31 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-06 12:16 [PATCH] usb: host: pci_quirks: fix memory leak, by adding iounmap Saurabh Sengar
2015-11-30 6:28 ` Saurabh Sengar
2015-11-30 9:05 ` Mathias Nyman
2015-12-01 22:35 ` Greg KH
2015-12-02 3:38 ` Saurabh Sengar
2015-12-02 15:45 ` Greg KH
2015-12-02 15:55 ` Saurabh Sengar
2015-12-02 16:29 ` Greg KH
2015-12-02 17:21 ` [PATCH v2] " Saurabh Sengar
2015-12-04 16:23 ` Greg KH
2015-12-04 16:31 ` Saurabh Sengar [this message]
2015-12-04 16:39 ` [PATCH v3] " Saurabh Sengar
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='CAA8avJ_8KELR1Ju=NLAs6wUVEtYUkkK+B90xjDOUAJaVn6n0dA@mail.gmail.com' \
--to=saurabh.truth@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=mathias.nyman@intel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.