Linux wireless drivers development
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: Michael Wu <flamingice@sourmilk.net>
Cc: linux-wireless <linux-wireless@vger.kernel.org>
Subject: mac80211 sta_info->dev race
Date: Tue, 11 Sep 2007 11:00:03 +0200	[thread overview]
Message-ID: <1189501203.4506.110.camel@johannes.berg> (raw)

[-- Attachment #1: Type: text/plain, Size: 636 bytes --]

Hey,

I'm working on making sta_info a per-virtual-interface structure for the
rare case where we have multiple virtual stations associated to the same
AP or for example WDS links.

Working through the code I notice that struct sta_info has a "dev"
pointer (which I will change to "sdata"), but as far as I can tell
nothing guarantees that we don't do sta_info_get(), then down the
interface, and then try to dereference sta_info->dev.

I see two ways to avoid this:
 (1) in sta_info_flush(), wait until each sta is actually released,
     don't just put it
 (2) with each sta_info_get() also do a dev_hold()

johannes

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 190 bytes --]

                 reply	other threads:[~2007-09-11 10:16 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=1189501203.4506.110.camel@johannes.berg \
    --to=johannes@sipsolutions.net \
    --cc=flamingice@sourmilk.net \
    --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