Please note: This project is no longer active. The website is kept online for historic purposes only.
If you´re looking for a Linux driver for your Atheros WLAN device, you should continue here .

Ticket #2325 (new defect)

Opened 12 years ago

Last modified 12 years ago

[patch]memory leak when AP scan or STA scan

Reported by: lewix.liu@gmail.com Assigned to:
Priority: minor Milestone:
Component: madwifi: 802.11 stack Version: trunk
Keywords: scan memory leak Cc:
Patch is attached: 0 Pending: 0

Description

In certain conditions, when flushing scan entry table or scan entry is age out or packet's ie has changed, the kmalloc'd memory of the information element (ie) will leak, although it is tiny-less than 32Bytes for a ie.

Attachments

memleak.patch (2.5 kB) - added by lewix.liu@gmail.com on 07/22/09 20:33:47.
Memory leak when AP/STA sta

Change History

07/22/09 20:33:47 changed by lewix.liu@gmail.com

  • attachment memleak.patch added.

Memory leak when AP/STA sta

(follow-up: ↓ 2 ) 07/30/09 16:01:55 changed by manty

I'm also having memleak problems which seem to come from madwifi, I have them with 0.9.4 from svn or current trunk (madwifi-free) I'm currently running the machine without madwifi to see if it was really madwifi the one that was causing the leak and it seems so.

I'm wondering if this patch could solve my issues with madwifi, I'll try to describe my setup so that you can tell me if my problem could be the same as the one you are fixing here.

My server has a madwifi driven card which is setup as a sta (using wpa2) of another AP and acts itself as an AP for two different networks, one with wpa2 and the other open. So, it has two APs and a client on the same card. I'm using Debian Lenny o a Pentium III running 2.6.31.3 with hostapd for the wpa2 AP and wpasupplicant for the client.

In some days, when I finish testing without madwifi I hope I will be able to get back to the madwifi setup and test your patch for some days.

This is a free after going to runlevel 1 on my system after 10.5 days of uptime with madwifi running on it:

total used free shared buffers cached

Mem: 386864 356588 30276 0 1556 27468 -/+ buffers/cache: 327564 59300 Swap: 803128 220 802908

(in reply to: ↑ 1 ) 07/30/09 18:24:22 changed by anonymous

I'm not sure if it's the same problem. I found it in such a setup: My AP, which is MIPS running Linux 2.6.18, continually scan in a complex radio environment with lots of AP and STA for several days. It seems different from yours.

A suggestion: cat /proc/slabinfo. Its output shows malloc'd memory size and counts. You should get two records before and after you tests. If the count of "size-32"(or "kmalloc-32") grows huge, this patch may solve your issue.

Replying to manty:

I'm also having memleak problems which seem to come from madwifi, I have them with 0.9.4 from svn or current trunk (madwifi-free) I'm currently running the machine without madwifi to see if it was really madwifi the one that was causing the leak and it seems so. I'm wondering if this patch could solve my issues with madwifi, I'll try to describe my setup so that you can tell me if my problem could be the same as the one you are fixing here. My server has a madwifi driven card which is setup as a sta (using wpa2) of another AP and acts itself as an AP for two different networks, one with wpa2 and the other open. So, it has two APs and a client on the same card. I'm using Debian Lenny o a Pentium III running 2.6.31.3 with hostapd for the wpa2 AP and wpasupplicant for the client. In some days, when I finish testing without madwifi I hope I will be able to get back to the madwifi setup and test your patch for some days. This is a free after going to runlevel 1 on my system after 10.5 days of uptime with madwifi running on it: total used free shared buffers cached Mem: 386864 356588 30276 0 1556 27468 -/+ buffers/cache: 327564 59300 Swap: 803128 220 802908