From: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
To: "Kalle Valo" <kvalo@codeaurora.org>, "Michael Büsch" <m@bues.ch>
Cc: netdev@vger.kernel.org, linux-wireless@vger.kernel.org,
linux-kernel@vger.kernel.org, b43-dev@lists.infradead.org,
Jia-Ju Bai <baijiaju1990@163.com>
Subject: [PATCH] b43: fix memory leak
Date: Fri, 19 Feb 2016 20:37:18 +0530 [thread overview]
Message-ID: <56C72FA6.3090102@gmail.com> (raw)
In-Reply-To: <87io1lqh3j.fsf@purkki.adurom.net>
On Friday 19 February 2016 01:14 PM, Kalle Valo wrote:
> Michael B?sch <m@bues.ch> writes:
>
>> On Thu, 18 Feb 2016 18:04:36 +0530
>> Sudip Mukherjee <sudipm.mukherjee@gmail.com> wrote:
>>
>>> From: Sudip Mukherjee <sudip@vectorindia.org>
>>>
>>> On error we jumped to the label bcma_out and returned the error code but
>>> we missed freeing dev.
>>>
>>> Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
>>> ---
>>> drivers/net/wireless/broadcom/b43/main.c | 1 +
>>> 1 file changed, 1 insertion(+)
>>>
>>> diff --git a/drivers/net/wireless/broadcom/b43/main.c b/drivers/net/wireless/broadcom/b43/main.c
>>> index c279211..78f670a 100644
>>> --- a/drivers/net/wireless/broadcom/b43/main.c
>>> +++ b/drivers/net/wireless/broadcom/b43/main.c
>>> @@ -5671,6 +5671,7 @@ static int b43_bcma_probe(struct bcma_device *core)
>>> wl = b43_wireless_init(dev);
>>> if (IS_ERR(wl)) {
>>> err = PTR_ERR(wl);
>>> + kfree(dev);
>>> goto bcma_out;
>>> }
>>>
>>
>> We recently had a patch that fixes this, among more leaks. Subject:
>> [PATCH v2 resend] b43: Fix memory leaks in b43_bus_dev_ssb_init and
>> b43_bus_dev_bcma_init
>>
>> Please test that patch instead, so we can finally apply it.
>>
>> It needs to be tested on both ssb and bcma. Come on. This isn't too
>> hard. :) Please somebody with any hardware test it. (I currently don't
>> have any b43 hardware)
>
> And the patch can be downloaded from patchwork:
>
> https://patchwork.kernel.org/patch/8049041/
I have an old laptop running on 800Mhz CPU. It has "Broadcom BCM4311
[14e4:4311] (rev 01)".
I will try to test it on this weekend.
regards
sudip
next prev parent reply other threads:[~2016-02-19 15:07 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-18 12:34 [PATCH] b43: fix memory leak Sudip Mukherjee
2016-02-18 13:40 ` Rafał Miłecki
2016-02-18 16:32 ` Michael Büsch
2016-02-19 7:44 ` Kalle Valo
2016-02-19 15:07 ` Sudip Mukherjee [this message]
2016-03-10 17:43 ` Michael Büsch
2016-03-10 17:56 ` Sudip Mukherjee
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=56C72FA6.3090102@gmail.com \
--to=sudipm.mukherjee@gmail.com \
--cc=b43-dev@lists.infradead.org \
--cc=baijiaju1990@163.com \
--cc=kvalo@codeaurora.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=m@bues.ch \
--cc=netdev@vger.kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).