linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: Eliad Peller <eliad@wizery.com>
Cc: linux-wireless@vger.kernel.org
Subject: Re: [PATCH] cfg80211: fix memory leak/corruption of bss_list
Date: Thu, 17 May 2012 21:47:12 +0200	[thread overview]
Message-ID: <1337284032.4687.1.camel@jlt3.sipsolutions.net> (raw)
In-Reply-To: <1337270768-22719-1-git-send-email-eliad@wizery.com> (sfid-20120517_180630_404692_8C265625)

On Thu, 2012-05-17 at 19:06 +0300, Eliad Peller wrote:
> cfg80211_dev_free() calls cfg80211_put_bss() directly on all
> the remaining bss entries, skipping the proper bss entry
> cleanup that usually made by __cfg80211_unlink_bss(), and
> leaving the bss_list and the rb_tree with dangling pointers.

>  	list_for_each_entry_safe(scan, tmp, &rdev->bss_list, list)
> -		cfg80211_put_bss(&scan->pub);
> +		cfg80211_unlink_bss(&rdev->wiphy, &scan->pub);
>  	kfree(rdev);

I don't see why we care, we free rdev anyway.

johannes


  parent reply	other threads:[~2012-05-17 19:47 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-17 16:06 [PATCH] cfg80211: fix memory leak/corruption of bss_list Eliad Peller
2012-05-17 19:29 ` Ben Greear
2012-05-17 21:39   ` Eliad Peller
2012-05-17 19:47 ` Johannes Berg [this message]
2012-05-17 21:34   ` Eliad Peller
2012-05-17 21:43     ` Ben Greear

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=1337284032.4687.1.camel@jlt3.sipsolutions.net \
    --to=johannes@sipsolutions.net \
    --cc=eliad@wizery.com \
    --cc=linux-wireless@vger.kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).