]> git.baikalelectronics.ru Git - kernel.git/commit
mac80211: verify info->control.vif is not NULL
authorJohannes Berg <johannes@sipsolutions.net>
Mon, 27 Jul 2009 08:33:31 +0000 (10:33 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Wed, 29 Jul 2009 19:46:13 +0000 (15:46 -0400)
commite0a6e0604840c4873df2b61046712492a0ce539a
tree0588a4d51146ea54ffc949bce9d2cc52d90943b1
parent3bae94f45f60bf5efc6edd022932636b979ecb5f
mac80211: verify info->control.vif is not NULL

When enqueuing packets on the internal packet queue, we
need to ensure that we have a valid vif pointer since
that is required since the net namespace work. Add some
assertions to verify this, but also don't crash is for
some reason we don't end up with a vif pointer -- warn
and drop the packet in all these cases.

Since this code touches a number of hotpaths, it is
intended to be temporary, or maybe configurable in the
future, at least the bit that is in the path that gets
hit for every packet, ieee80211_tx_pending().

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
net/mac80211/tx.c
net/mac80211/util.c