public inbox for linux-bluetooth@vger.kernel.org
 help / color / mirror / Atom feed
From: bugzilla-daemon@kernel.org
To: linux-bluetooth@vger.kernel.org
Subject: [Bug 215197] Memory leaks show up when using Edimax Wi-Fi N150 Bluetooth/Wireless USB Adapter (RTL8XXXU)
Date: Fri, 09 Dec 2022 01:17:15 +0000	[thread overview]
Message-ID: <bug-215197-62941-wz6BjzH90B@https.bugzilla.kernel.org/> (raw)
In-Reply-To: <bug-215197-62941@https.bugzilla.kernel.org/>

https://bugzilla.kernel.org/show_bug.cgi?id=215197

--- Comment #10 from Erhard F. (erhard_f@mailbox.org) ---
(In reply to rtl8821cerfe2 from comment #8)
> Hi!
> 
> Can you check if this 100% untested patch fixes the leak?
Checked it out today. Seems you nailed it with your 100% untested patch! :)

I needed to take a small modification however or else I get a
"drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c:5609:1: error: expected
statement" at building.

The ';' before the function end needs to stay as 'out:' expects a statement
next. Sure ugly as hell but so is the accompanying goto a few lines above.


--- a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c     2022-12-09
01:51:56.213989176 +0100
+++ b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.cn    2022-12-09
01:56:35.543654839 +0100
@@ -5601,10 +5601,12 @@
                default:
                        break;
                }
+
+               dev_kfree_skb(skb);
        }

 out:
-       dev_kfree_skb(skb);
+       ;
 }

 static void rtl8723bu_handle_c2h(struct rtl8xxxu_priv *priv,


Patch applies on v6.1-rc8 and with this small modification building succeeds.
With the patch applied I have not seen the memleak since, even when taking
actions provoking it faster (e.g. unplugging and re-plugging the USB adapter
while playing sound). Without the patch v6.1-rc8 still shows the leak.

And so far I have not noticed any side effects of the patch in kernel dmesg.

-- 
You may reply to this email to add a comment.

You are receiving this mail because:
You are the assignee for the bug.

  parent reply	other threads:[~2022-12-09  1:17 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-02  0:03 [Bug 215197] New: Memory leaks show up a while after usung Edimax Wi-Fi N150 Bluetooth4.0 USB Adapter (rtl8723be) bugzilla-daemon
2021-12-02  0:04 ` [Bug 215197] " bugzilla-daemon
2021-12-02  0:04 ` bugzilla-daemon
2021-12-02  0:07 ` bugzilla-daemon
2021-12-02  0:08 ` bugzilla-daemon
2022-09-14 13:10 ` [Bug 215197] Memory leaks show up when using Edimax Wi-Fi N150 Bluetooth/Wireless USB Adapter (RTL8XXXU) bugzilla-daemon
2022-09-14 13:11 ` bugzilla-daemon
2022-09-14 13:12 ` bugzilla-daemon
2022-09-14 13:13 ` bugzilla-daemon
2022-11-17 21:22 ` bugzilla-daemon
2022-11-24 12:38 ` bugzilla-daemon
2022-12-09  1:17 ` bugzilla-daemon [this message]
2022-12-09 11:29 ` bugzilla-daemon
2022-12-09 11:32 ` bugzilla-daemon
2024-04-29 21:38 ` bugzilla-daemon

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=bug-215197-62941-wz6BjzH90B@https.bugzilla.kernel.org/ \
    --to=bugzilla-daemon@kernel.org \
    --cc=linux-bluetooth@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