Bug 148317 - [ath] FreeBSD 7.x hostap memory leak in net80211 or Atheros driver
Summary: [ath] FreeBSD 7.x hostap memory leak in net80211 or Atheros driver
Status: Open
Alias: None
Product: Base System
Classification: Unclassified
Component: wireless (show other bugs)
Version: 7.3-RELEASE
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-wireless (Nobody)
Depends on:
Reported: 2010-07-02 14:10 UTC by Boris Kochergin
Modified: 2018-05-28 19:47 UTC (History)
0 users

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description Boris Kochergin 2010-07-02 14:10:05 UTC
When using an Atheros 5212 PCI controller as a busy 7.x access point, a memory leak occurs frequently and eventually leads to a panic. The problem has been observed on multiple machines. Relevant "vmstat -m" output when the leak is observed:

80211node 12677 101401K       -   120901  16,512

Running "ifconfig ath0 down" (ath0 being the controller in hostap mode) frees the memory. The problem occurs with all three rate-control algorithms. I have eliminated some possible allocations that might cause the leak and have narrowed it down to two:

Line 595 of /usr/src/sys/net80211/ieee80211_node.c:

       MALLOC(ni, struct ieee80211_node *, sizeof(struct ieee80211_node),
               M_80211_NODE, M_NOWAIT | M_ZERO);

Line 3164 of /usr/src/sys/dev/ath/if_ath.c:

       an = malloc(space, M_80211_NODE, M_NOWAIT|M_ZERO);

It looks like both are supposed to be freed by node_free() in /usr/src/sys/net80211/ieee80211_node.c, but there is some code path where that doesn't happen, and should.
Comment 1 Mark Linimon freebsd_committer freebsd_triage 2010-07-12 16:40:30 UTC
Responsible Changed
From-To: freebsd-bugs->freebsd-net

Over to maintainer(s).
Comment 2 Adrian Chadd freebsd_committer 2011-04-11 12:41:26 UTC
Responsible Changed
From-To: freebsd-net->freebsd-wireless

punt to wireless list
Comment 3 Eitan Adler freebsd_committer freebsd_triage 2018-05-28 19:47:27 UTC
batch change:

For bugs that match the following
-  Status Is In progress 
- Untouched since 2018-01-01.
- Affects Base System OR Documentation


Reset to open status.

I did a quick pass but if you are getting this email it might be worthwhile to double check to see if this bug ought to be closed.