Bug 206811 - backport-iwlwifi: memory leak when changing channels
Summary: backport-iwlwifi: memory leak when changing channels
Status: CLOSED CODE_FIX
Alias: None
Product: Drivers
Classification: Unclassified
Component: network-wireless (show other bugs)
Hardware: ARM Linux
: P1 normal
Assignee: DO NOT USE - assign "network-wireless-intel" component instead
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-03-10 16:48 UTC by John Balian
Modified: 2020-04-06 07:58 UTC (History)
2 users (show)

See Also:
Kernel Version: 4.1.30
Subsystem:
Regression: No
Bisected commit-id:


Attachments
dmesg.log after reboot (35.88 KB, text/plain)
2020-03-10 16:48 UTC, John Balian
Details

Description John Balian 2020-03-10 16:48:37 UTC
Created attachment 287853 [details]
dmesg.log after reboot

I apologize if this is not the appropriate place to report such a problem.

This is on an Intel AX200 in monitor mode (packet capture) while changing the channel every few seconds.  

The problem is reproducible using iw to change channels repeatedly while the system is doing little else.

iw dev radiotap2 set channel 1
iw dev radiotap2 set channel 2
iw dev radiotap2 set channel 3
...

I'm using the 'free' command to display available memory, and I can see it drop over time
free | grep Mem | awk '{print $7}'
There are normal up down variances when displaying available memory, but the trend is down

I am also using the same (old) kernel and new backports driver with the 8260 and 9260 AC radios and I do not see the memory problem. 

I've attached dmesg output from bootup (as you can see I'm trying to get kmemleak to work, but am fighting that battle as well!)

I've upgraded iw to version 5.4, but this has not helped either.

# ethtool -i radiotap2 | grep firmware
firmware-version: 48.4fa0041f.0 cc-a0-48.ucode
Comment 1 Johannes Berg 2020-03-10 20:36:51 UTC
Can you try this?

https://p.sipsolutions.net/1db3c0ff75fb385d.txt
Comment 2 Johannes Berg 2020-03-10 20:48:37 UTC
Sorry, that didn't compile, wrong base tree. Replace "trans->txqs.txq" by "trans_pcie->txq" in both lines.
Comment 3 John Balian 2020-03-10 21:24:26 UTC
It has been running about 10 minutes and memory looks very stable so far.  I'll let it run overnight, but I think it's a great fix.

I will let you know.

Thank you!
Comment 4 Luca Coelho 2020-03-11 10:42:56 UTC
I merged Johannes' fix to our internal tree (master branch).  I'll push it out once we applied this to older cores.
Comment 5 John Balian 2020-03-11 12:41:49 UTC
Overnight testing was a success, no memory lost at all.
Comment 6 Luca Coelho 2020-04-06 07:58:55 UTC
Patch sent upstream: https://patchwork.kernel.org/patch/11472085/

This will go into our iwlwifi-backport tree as soon as I fix our generation job that is broken at the moment.

Note You need to log in before you can comment on or make changes to this bug.