alistair23-linux/net/mac80211
Johannes Berg 3b96766f0e mac80211: fix key vs. sta locking problems
Up to now, key manipulation is supposed to run under RTNL to
avoid concurrent manipulations and also allow the set_key()
hardware callback to sleep. This is not feasible because STA
structs are rcu-protected and thus a lot of operations there
cannot take the RTNL. Also, key references are rcu-protected
so we cannot do things atomically.

This patch changes key locking completely:
 * key operations are now atomic
 * hardware crypto offload is enabled and disabled from
   a workqueue, due to that key freeing is also delayed
 * debugfs code is also run from a workqueue
 * keys reference STAs (and vice versa!) so during STA
   unlink the STAs key reference is removed but not the
   keys STA reference, to avoid races key todo work is
   run before STA destruction.
 * fewer STA operations now need the RTNL which was
   required due to key operations

This fixes the locking problems lockdep pointed out and also
makes things more light-weight because the rtnl isn't required
as much.

Note that the key todo lock/key mutex are global locks, this
is not required, of course, they could be per-hardware instead.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-04-08 16:44:45 -04:00
..
aes_ccm.c cleanup asm/scatterlist.h includes 2007-11-02 08:47:06 +01:00
aes_ccm.h [MAC80211]: Add mac80211 wireless stack. 2007-05-05 11:45:53 -07:00
cfg.c mac80211: fix key vs. sta locking problems 2008-04-08 16:44:45 -04:00
cfg.h [MAC80211]: rename ieee80211_cfg.h to cfg.h 2007-10-10 16:52:34 -07:00
debugfs.c mac80211: make debugfs files root-only 2008-04-08 16:44:43 -04:00
debugfs.h [MAC80211]: Add debugfs attributes. 2007-05-05 11:46:38 -07:00
debugfs_key.c mac80211: fix key vs. sta locking problems 2008-04-08 16:44:45 -04:00
debugfs_key.h mac80211: fix key vs. sta locking problems 2008-04-08 16:44:45 -04:00
debugfs_netdev.c mac80211: make debugfs files root-only 2008-04-08 16:44:43 -04:00
debugfs_netdev.h [MAC80211]: Add debugfs attributes. 2007-05-05 11:46:38 -07:00
debugfs_sta.c mac80211: make debugfs files root-only 2008-04-08 16:44:43 -04:00
debugfs_sta.h mac80211: RCU-ify STA info structure access 2008-03-06 15:30:46 -05:00
event.c [NET]: Introduce and use print_mac() and DECLARE_MAC_BUF() 2007-10-10 16:51:42 -07:00
ieee80211.c mac80211: fix key vs. sta locking problems 2008-04-08 16:44:45 -04:00
ieee80211_i.h mac80211: fix key vs. sta locking problems 2008-04-08 16:44:45 -04:00
ieee80211_iface.c mac80211: remove STA entries when taking down interface 2008-03-06 15:30:47 -05:00
ieee80211_ioctl.c mac80211: fix key vs. sta locking problems 2008-04-08 16:44:45 -04:00
ieee80211_key.h mac80211: fix key vs. sta locking problems 2008-04-08 16:44:45 -04:00
ieee80211_led.c mac80211: Add radio led trigger 2008-01-28 15:01:04 -08:00
ieee80211_led.h mac80211: Add radio led trigger 2008-01-28 15:01:04 -08:00
ieee80211_rate.c mac80211: RCU-ify STA info structure access 2008-03-06 15:30:46 -05:00
ieee80211_rate.h the scheduled rc80211-simple.c removal 2008-03-13 16:02:31 -04:00
ieee80211_sta.c mac80211: fix key vs. sta locking problems 2008-04-08 16:44:45 -04:00
Kconfig the scheduled rc80211-simple.c removal 2008-03-13 16:02:31 -04:00
key.c mac80211: fix key vs. sta locking problems 2008-04-08 16:44:45 -04:00
Makefile the scheduled rc80211-simple.c removal 2008-03-13 16:02:31 -04:00
mesh.c Revert "mac80211: use a struct for bss->mesh_config" 2008-04-08 14:15:46 -04:00
mesh.h Revert "mac80211: use a struct for bss->mesh_config" 2008-04-08 14:15:46 -04:00
mesh_hwmp.c mac80211: clean up IEEE80211_FC use 2008-04-08 16:44:41 -04:00
mesh_pathtbl.c mac80211: fix mesh_path and sta_info get_by_idx functions 2008-03-06 16:40:54 -05:00
mesh_plink.c mac80211: clean up IEEE80211_FC use 2008-04-08 16:44:41 -04:00
michael.c [MAC80211]: Add mac80211 wireless stack. 2007-05-05 11:45:53 -07:00
michael.h [MAC80211]: Add mac80211 wireless stack. 2007-05-05 11:45:53 -07:00
rc80211_pid.h rc80211-pid: fix definition of rate control interval 2008-01-28 15:00:55 -08:00
rc80211_pid_algo.c mac80211: RCU-ify STA info structure access 2008-03-06 15:30:46 -05:00
rc80211_pid_debugfs.c mac80211: make rc_pid_fop_events static 2008-01-28 15:00:56 -08:00
rx.c mac80211: use recent multicast table for all mesh multicast frames 2008-04-01 17:14:11 -04:00
sta_info.c mac80211: fix key vs. sta locking problems 2008-04-08 16:44:45 -04:00
sta_info.h mac80211: fix key vs. sta locking problems 2008-04-08 16:44:45 -04:00
tkip.c mac80211: allows driver to request a Phase 1 RX key 2008-03-25 16:41:53 -04:00
tkip.h mac80211: allows driver to request a Phase 1 RX key 2008-03-25 16:41:53 -04:00
tx.c mac80211: add station aid into ieee80211_tx_control 2008-04-08 15:05:57 -04:00
util.c mac80211: split ieee80211_txrx_data 2008-03-06 15:30:46 -05:00
wep.c mac80211: split ieee80211_txrx_data 2008-03-06 15:30:46 -05:00
wep.h mac80211: split ieee80211_txrx_data 2008-03-06 15:30:46 -05:00
wme.c mac80211: RCU-ify STA info structure access 2008-03-06 15:30:46 -05:00
wme.h mac80211: A-MPDU Tx adding qdisc support 2008-02-29 15:19:17 -05:00
wpa.c mac80211: allows driver to request a Phase 1 RX key 2008-03-25 16:41:53 -04:00
wpa.h mac80211: split ieee80211_txrx_data 2008-03-06 15:30:46 -05:00