* [PATCH] b43: fix memory leak
@ 2016-02-18 12:34 Sudip Mukherjee
2016-02-18 13:40 ` Rafał Miłecki
2016-02-18 16:32 ` Michael Büsch
0 siblings, 2 replies; 14+ messages in thread
From: Sudip Mukherjee @ 2016-02-18 12:34 UTC (permalink / raw)
To: Kalle Valo; +Cc: linux-kernel, linux-wireless, b43-dev, netdev
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;
}
--
1.9.1
^ permalink raw reply related [flat|nested] 14+ messages in thread
* Re: [PATCH] b43: fix memory leak
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
1 sibling, 0 replies; 14+ messages in thread
From: Rafał Miłecki @ 2016-02-18 13:40 UTC (permalink / raw)
To: Sudip Mukherjee
Cc: Kalle Valo, Network Development, linux-wireless,
Linux Kernel Mailing List, b43-dev
On 18 February 2016 at 13:34, 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.
What if b43_one_core_attach fails? Won't we miss kfree then as well?
Shouldn't you simply improve error path and maybe use an additional
label? Also may we be missing a proper free in b43_bcma_remove as
well?
Your patch subject could also be a bit more descriptive (e.g. what
memory leak exactly is it).
^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH] b43: fix memory leak
@ 2016-02-18 13:40 ` Rafał Miłecki
0 siblings, 0 replies; 14+ messages in thread
From: Rafał Miłecki @ 2016-02-18 13:40 UTC (permalink / raw)
To: Sudip Mukherjee
Cc: Kalle Valo, Network Development, linux-wireless,
Linux Kernel Mailing List, b43-dev
On 18 February 2016 at 13:34, 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.
What if b43_one_core_attach fails? Won't we miss kfree then as well?
Shouldn't you simply improve error path and maybe use an additional
label? Also may we be missing a proper free in b43_bcma_remove as
well?
Your patch subject could also be a bit more descriptive (e.g. what
memory leak exactly is it).
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH] b43: fix memory leak
2016-02-18 12:34 [PATCH] b43: fix memory leak Sudip Mukherjee
@ 2016-02-18 16:32 ` Michael Büsch
2016-02-18 16:32 ` Michael Büsch
1 sibling, 0 replies; 14+ messages in thread
From: Michael Büsch @ 2016-02-18 16:32 UTC (permalink / raw)
To: Sudip Mukherjee
Cc: Kalle Valo, netdev, linux-wireless, linux-kernel, b43-dev, Jia-Ju Bai
[-- Attachment #1: Type: text/plain, Size: 1257 bytes --]
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)
--
Michael
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH] b43: fix memory leak
@ 2016-02-18 16:32 ` Michael Büsch
0 siblings, 0 replies; 14+ messages in thread
From: Michael Büsch @ 2016-02-18 16:32 UTC (permalink / raw)
To: Sudip Mukherjee
Cc: Kalle Valo, netdev, linux-wireless, linux-kernel, b43-dev, Jia-Ju Bai
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)
--
Michael
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://lists.infradead.org/pipermail/b43-dev/attachments/20160218/4d19a6dd/attachment.sig>
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH] b43: fix memory leak
2016-02-18 16:32 ` Michael Büsch
@ 2016-02-19 7:44 ` Kalle Valo
-1 siblings, 0 replies; 14+ messages in thread
From: Kalle Valo @ 2016-02-19 7:44 UTC (permalink / raw)
To: Michael Büsch
Cc: Sudip Mukherjee, netdev, linux-wireless, linux-kernel, b43-dev,
Jia-Ju Bai
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/
--
Kalle Valo
^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH] b43: fix memory leak
@ 2016-02-19 7:44 ` Kalle Valo
0 siblings, 0 replies; 14+ messages in thread
From: Kalle Valo @ 2016-02-19 7:44 UTC (permalink / raw)
To: Michael Büsch
Cc: Sudip Mukherjee, netdev, linux-wireless, linux-kernel, b43-dev,
Jia-Ju Bai
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/
--
Kalle Valo
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH] b43: fix memory leak
2016-02-19 7:44 ` Kalle Valo
@ 2016-02-19 15:07 ` Sudip Mukherjee
-1 siblings, 0 replies; 14+ messages in thread
From: Sudip Mukherjee @ 2016-02-19 15:07 UTC (permalink / raw)
To: Kalle Valo, Michael Büsch
Cc: netdev, linux-wireless, linux-kernel, b43-dev, Jia-Ju Bai
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
^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH] b43: fix memory leak
@ 2016-02-19 15:07 ` Sudip Mukherjee
0 siblings, 0 replies; 14+ messages in thread
From: Sudip Mukherjee @ 2016-02-19 15:07 UTC (permalink / raw)
To: Kalle Valo, Michael Büsch
Cc: netdev, linux-wireless, linux-kernel, b43-dev, Jia-Ju Bai
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
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH] b43: fix memory leak
@ 2016-03-10 17:43 ` Michael Büsch
0 siblings, 0 replies; 14+ messages in thread
From: Michael Büsch @ 2016-03-10 17:43 UTC (permalink / raw)
To: Sudip Mukherjee
Cc: Kalle Valo, netdev, Jia-Ju Bai, linux-wireless, linux-kernel, b43-dev
[-- Attachment #1: Type: text/plain, Size: 330 bytes --]
On Fri, 19 Feb 2016 20:37:18 +0530
Sudip Mukherjee <sudipm.mukherjee@gmail.com> wrote:
> > 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.
Any news on this one?
--
Michael
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH] b43: fix memory leak
@ 2016-03-10 17:43 ` Michael Büsch
0 siblings, 0 replies; 14+ messages in thread
From: Michael Büsch @ 2016-03-10 17:43 UTC (permalink / raw)
To: Sudip Mukherjee
Cc: Kalle Valo, netdev-u79uwXL29TY76Z2rM5mHXA, Jia-Ju Bai,
linux-wireless-u79uwXL29TY76Z2rM5mHXA,
linux-kernel-u79uwXL29TY76Z2rM5mHXA,
b43-dev-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r
[-- Attachment #1: Type: text/plain, Size: 360 bytes --]
On Fri, 19 Feb 2016 20:37:18 +0530
Sudip Mukherjee <sudipm.mukherjee-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> > 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.
Any news on this one?
--
Michael
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH] b43: fix memory leak
@ 2016-03-10 17:43 ` Michael Büsch
0 siblings, 0 replies; 14+ messages in thread
From: Michael Büsch @ 2016-03-10 17:43 UTC (permalink / raw)
To: Sudip Mukherjee
Cc: Kalle Valo, netdev, Jia-Ju Bai, linux-wireless, linux-kernel, b43-dev
On Fri, 19 Feb 2016 20:37:18 +0530
Sudip Mukherjee <sudipm.mukherjee@gmail.com> wrote:
> > 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.
Any news on this one?
--
Michael
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://lists.infradead.org/pipermail/b43-dev/attachments/20160310/1e3664da/attachment.sig>
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH] b43: fix memory leak
2016-03-10 17:43 ` Michael Büsch
@ 2016-03-10 17:56 ` Sudip Mukherjee
-1 siblings, 0 replies; 14+ messages in thread
From: Sudip Mukherjee @ 2016-03-10 17:56 UTC (permalink / raw)
To: Michael Büsch
Cc: Kalle Valo, netdev, Jia-Ju Bai, linux-wireless, linux-kernel, b43-dev
On Thursday 10 March 2016 11:13 PM, Michael Büsch wrote:
> On Fri, 19 Feb 2016 20:37:18 +0530
> Sudip Mukherjee <sudipm.mukherjee@gmail.com> wrote:
>
>>> 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.
>
> Any news on this one?
No. Sorry. I was trying to install ubuntu 14.04 in it, but for some
reason the usb stick is not moving past the boot screen. Give me two
more days and I will let you all know by this Saturday.
regards
sudip
^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH] b43: fix memory leak
@ 2016-03-10 17:56 ` Sudip Mukherjee
0 siblings, 0 replies; 14+ messages in thread
From: Sudip Mukherjee @ 2016-03-10 17:56 UTC (permalink / raw)
To: Michael Büsch
Cc: Kalle Valo, netdev, Jia-Ju Bai, linux-wireless, linux-kernel, b43-dev
On Thursday 10 March 2016 11:13 PM, Michael B?sch wrote:
> On Fri, 19 Feb 2016 20:37:18 +0530
> Sudip Mukherjee <sudipm.mukherjee@gmail.com> wrote:
>
>>> 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.
>
> Any news on this one?
No. Sorry. I was trying to install ubuntu 14.04 in it, but for some
reason the usb stick is not moving past the boot screen. Give me two
more days and I will let you all know by this Saturday.
regards
sudip
^ permalink raw reply [flat|nested] 14+ messages in thread
end of thread, other threads:[~2016-03-10 17:56 UTC | newest]
Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-02-18 12:34 [PATCH] b43: fix memory leak Sudip Mukherjee
2016-02-18 13:40 ` Rafał Miłecki
2016-02-18 13:40 ` Rafał Miłecki
2016-02-18 16:32 ` Michael Büsch
2016-02-18 16:32 ` Michael Büsch
2016-02-19 7:44 ` Kalle Valo
2016-02-19 7:44 ` Kalle Valo
2016-02-19 15:07 ` Sudip Mukherjee
2016-02-19 15:07 ` Sudip Mukherjee
2016-03-10 17:43 ` Michael Büsch
2016-03-10 17:43 ` Michael Büsch
2016-03-10 17:43 ` Michael Büsch
2016-03-10 17:56 ` Sudip Mukherjee
2016-03-10 17:56 ` Sudip Mukherjee
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.