mac80211 sta_info->dev race

From: Johannes Berg <johannes@sipsolutions.net>
Date: 2007-09-11 10:16:05

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

Attachments

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help