This causes an oops when the bcm43xx_hdr-0.fw binary is not found.
Signed-off-by: Stanislav Fomichev <[email protected]>
---
drivers/staging/brcm80211/sys/wl_mac80211.c | 2 --
1 files changed, 0 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/brcm80211/sys/wl_mac80211.c b/drivers/staging/brcm80211/sys/wl_mac80211.c
index cd8392b..5faa521 100644
--- a/drivers/staging/brcm80211/sys/wl_mac80211.c
+++ b/drivers/staging/brcm80211/sys/wl_mac80211.c
@@ -1767,7 +1767,6 @@ static int wl_request_fw(struct wl_info *wl, struct pci_dev *pdev)
if (status) {
printf("%s: fail to load firmware %s\n",
KBUILD_MODNAME, fw_name);
- wl_release_fw(wl);
return status;
}
WL_NONE("request fw %s\n", fw_name);
@@ -1777,7 +1776,6 @@ static int wl_request_fw(struct wl_info *wl, struct pci_dev *pdev)
if (status) {
printf("%s: fail to load firmware %s\n",
KBUILD_MODNAME, fw_name);
- wl_release_fw(wl);
return status;
}
wl->fw.hdr_num_entries[i] =
--
1.7.1
Hello Dan and Stanislav,
I already had a patch in the making that is a superset of Stanislav's
patch. It fixes the leak issue. I agreed with Stanislav's patch since, I
made the same (but: more) changes. Stanislav, can we agree that we wait
for my patch (I plan on delivering this tomorrow) ?
Thanks, Roland.
On 02/14/2011 09:22 PM, Dan Carpenter wrote:
>> On 02/12/2011 04:00 PM, Stanislav Fomichev wrote:
>>> This causes an oops when the bcm43xx_hdr-0.fw binary is not found.
>>>
>
> This patch isn't right. It fixes the oops but it introduces some leaks.
> (We still need to release firmware that was allocated successfully).
>
> regards,
> dan carpenter
>
On Sat, Feb 12, 2011 at 06:00:33PM +0300, Stanislav Fomichev wrote:
> This causes an oops when the bcm43xx_hdr-0.fw binary is not found.
>
> Signed-off-by: Stanislav Fomichev <[email protected]>
> ---
> drivers/staging/brcm80211/sys/wl_mac80211.c | 2 --
This doesn't apply on linux-next, what tree is it supposed to be for?
confused,
greg k-h
> This patch isn't right. It fixes the oops but it introduces some leaks.
> (We still need to release firmware that was allocated successfully).
Sorry Dan, but where do you see the leaks? We make a call to
wl_request_fw and if returns non-zero call wl_release_fw for a cleanup.
I just removed the call to wl_release_fw in the wl_request_fw itself; so
it should not introduce any leak.
Could you pls clarify?
--
Stas
> This doesn't apply on linux-next, what tree is it supposed to be for?
I suppose it was based on the Linus's tree (I didn't know that the
developing is going on on this list).
Anyway, pls drop this patch; the similar fixes should be done in one of
the Roland Vossen's patches.
--
Stas
On Tue, Feb 15, 2011 at 12:07:55AM +0300, Stanislav Fomichev wrote:
> > This patch isn't right. It fixes the oops but it introduces some leaks.
> > (We still need to release firmware that was allocated successfully).
> Sorry Dan, but where do you see the leaks? We make a call to
> wl_request_fw and if returns non-zero call wl_release_fw for a cleanup.
>
> I just removed the call to wl_release_fw in the wl_request_fw itself; so
> it should not introduce any leak.
>
> Could you pls clarify?
Ah. Right. I see what you're saying. Your patch looks good to me.
regards,
dan carpenter
Hi Stanislav,
this patch is ok with me. For future patches, can you post to
[email protected] since that is the main list for the
brcm80211 driver ?
I will align yet unsubmitted patches having to do with firmware handling
with your patch.
Thanks, Roland.
Reviewed-by: Roland Vossen <[email protected]>
On 02/12/2011 04:00 PM, Stanislav Fomichev wrote:
> This causes an oops when the bcm43xx_hdr-0.fw binary is not found.
>
> Signed-off-by: Stanislav Fomichev<[email protected]>
> ---
> drivers/staging/brcm80211/sys/wl_mac80211.c | 2 --
> 1 files changed, 0 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/staging/brcm80211/sys/wl_mac80211.c b/drivers/staging/brcm80211/sys/wl_mac80211.c
> index cd8392b..5faa521 100644
> --- a/drivers/staging/brcm80211/sys/wl_mac80211.c
> +++ b/drivers/staging/brcm80211/sys/wl_mac80211.c
> @@ -1767,7 +1767,6 @@ static int wl_request_fw(struct wl_info *wl, struct pci_dev *pdev)
> if (status) {
> printf("%s: fail to load firmware %s\n",
> KBUILD_MODNAME, fw_name);
> - wl_release_fw(wl);
> return status;
> }
> WL_NONE("request fw %s\n", fw_name);
> @@ -1777,7 +1776,6 @@ static int wl_request_fw(struct wl_info *wl, struct pci_dev *pdev)
> if (status) {
> printf("%s: fail to load firmware %s\n",
> KBUILD_MODNAME, fw_name);
> - wl_release_fw(wl);
> return status;
> }
> wl->fw.hdr_num_entries[i] =
> On 02/12/2011 04:00 PM, Stanislav Fomichev wrote:
> >This causes an oops when the bcm43xx_hdr-0.fw binary is not found.
> >
This patch isn't right. It fixes the oops but it introduces some leaks.
(We still need to release firmware that was allocated successfully).
regards,
dan carpenter
Hi all,
> I already had a patch in the making that is a superset of
> Stanislav's patch. It fixes the leak issue. I agreed with
> Stanislav's patch since, I made the same (but: more) changes.
> Stanislav, can we agree that we wait for my patch (I plan on
> delivering this tomorrow) ?
It's alright with me. I just wanted to point out an error; so I can wait
for a better fix.
--
Stas