From: Johannes Berg <johannes@sipsolutions.net>
To: Larry Finger <Larry.Finger@lwfinger.net>, mcgrof@do-not-panic.com
Cc: linux-wireless <linux-wireless@vger.kernel.org>
Subject: Re: Memory leak in cfg80211
Date: Mon, 04 Feb 2013 18:24:12 +0100 [thread overview]
Message-ID: <1359998652.17993.9.camel@jlt4.sipsolutions.net> (raw)
In-Reply-To: <510D9E71.2080300@lwfinger.net> (sfid-20130203_001709_849515_E1CDB041)
Larry,
> A recent change to cfg80211 has resulted in kmemleak reporting a new leak:
Curious.
> unreferenced object 0xffff8800b24cba80 (size 192):
> comm "kworker/1:0", pid 13, jiffies 4294899104 (age 5432.336s)
> hex dump (first 32 bytes):
> 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
> 06 00 00 00 55 53 00 00 d0 a6 24 00 40 b8 25 00 ....US....$.@.%.
> backtrace:
> [<ffffffff81444cf1>] kmemleak_alloc+0x21/0x50
> [<ffffffff81147770>] __kmalloc+0x130/0x2c0
> [<ffffffffa02b93e3>] reg_copy_regd+0x23/0xa0 [cfg80211]
> [<ffffffffa02ba5e2>] reg_todo+0x3d2/0x5a0 [cfg80211]
> [<ffffffff81063cdd>] process_one_work+0x19d/0x6f0
> [<ffffffff81064605>] worker_thread+0x155/0x400
> [<ffffffff81069b56>] kthread+0xd6/0xe0
> [<ffffffff8145ba7c>] ret_from_fork+0x7c/0xb0
> [<ffffffffffffffff>] 0xffffffffffffffff
>
> The traceback points back to the call at line 353 of net/wireless/reg.c where
> the regd space is allocated.
Yeah. The more interesting part (I think) is reg_todo(), which seems it
really is the __regulatory_hint() function, which gets inlined.
Were you able to reproduce this? I don't think I can since my devices
(Intel) don't use wiphy->regd. If you can, maybe you could try to
dump_stack() with the pointer every time wiphy->regd gets assigned, and
also print the old value.
To me, this looks like wiphy->regd gets overwritten without freeing the
old value, but I don't see what recent (since 3.7) change should have
caused this to change behaviour. Luis?
johannes
next prev parent reply other threads:[~2013-02-04 17:23 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-02 23:17 Memory leak in cfg80211 Larry Finger
2013-02-04 17:24 ` Johannes Berg [this message]
2013-02-04 17:43 ` Larry Finger
2013-02-04 19:31 ` Larry Finger
2013-02-04 20:56 ` Johannes Berg
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=1359998652.17993.9.camel@jlt4.sipsolutions.net \
--to=johannes@sipsolutions.net \
--cc=Larry.Finger@lwfinger.net \
--cc=linux-wireless@vger.kernel.org \
--cc=mcgrof@do-not-panic.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.