Date: Fri, 2 Jul 2010 13:07:08 GMT From: Boris Kochergin <spawk@acm.poly.edu> To: freebsd-gnats-submit@FreeBSD.org Subject: kern/148317: FreeBSD 7.x hostap memory leak in net80211 or Atheros driver Message-ID: <201007021307.o62D78oE070775@www.freebsd.org> Resent-Message-ID: <201007021310.o62DA5bd058585@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 148317
>Category: kern
>Synopsis: FreeBSD 7.x hostap memory leak in net80211 or Atheros driver
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Fri Jul 02 13:10:05 UTC 2010
>Closed-Date:
>Last-Modified:
>Originator: Boris Kochergin
>Release: 7.3-RELEASE-p1
>Organization:
Polytechnic Institute of NYU
>Environment:
FreeBSD varick-ap-2 7.3-RELEASE-p1 FreeBSD 7.3-RELEASE-p1 #3: Wed Jun 16 09:56:35 EDT 2010 boris@varick-ap-2:/usr/obj/usr/src/sys/VARICK-5501-AP i386
>Description:
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.
>How-To-Repeat:
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201007021307.o62D78oE070775>
