linux/drivers/net/wireless/iwlwifi
Stanislaw Gruszka 3598e1774c iwlwifi: fix enqueue hcmd race conditions
We mark command as huge by using meta->flags from other (non huge) command,
but flags can be possibly overridden, when non huge command is enqueued,
what can lead to:

WARNING: at lib/dma-debug.c:696 dma_debug_device_change+0x1a3/0x1f0()
DMA-API: device driver has pending DMA allocations while released from device [count=1]

To fix introduce additional CMD_MAPPED to mark command as mapped and
serialize iwl_enqueue_hcmd() with iwl_tx_cmd_complete() using
hcmd_lock. Serialization will also fix possible race conditions,
because q->read_ptr, q->write_ptr are modified/used in parallel.

On the way fix whitespace.

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Acked-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-07 15:34:11 -04:00
..
iwl-1000.c Merge branch 'wireless-next-2.6' of git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-2.6 2011-04-04 16:10:36 -04:00
iwl-2000.c iwlagn: clean up TX aggregation code 2011-03-25 06:57:30 -07:00
iwl-5000-hw.h
iwl-5000.c Merge branch 'wireless-next-2.6' of git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-2.6 2011-04-04 16:10:36 -04:00
iwl-6000-hw.h
iwl-6000.c iwlagn: clean up TX aggregation code 2011-03-25 06:57:30 -07:00
iwl-agn-calib.c
iwl-agn-calib.h
iwl-agn-debugfs.c
iwl-agn-debugfs.h
iwl-agn-eeprom.c
iwl-agn-hcmd.c
iwl-agn-hw.h
iwl-agn-ict.c iwlwifi: remove legacy isr tasklet 2011-03-25 06:58:24 -07:00
iwl-agn-led.c
iwl-agn-led.h
iwl-agn-lib.c Merge branch 'wireless-next-2.6' of git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-2.6 2011-04-04 16:10:36 -04:00
iwl-agn-rs.c iwlwifi: add RATE_MCS_RATE_MSK 2011-03-25 06:58:06 -07:00
iwl-agn-rs.h
iwl-agn-rxon.c
iwl-agn-sta.c
iwl-agn-tt.c
iwl-agn-tt.h
iwl-agn-tx.c iwlwifi: cleanup and bugfix tx aggregation code 2011-03-25 06:57:59 -07:00
iwl-agn-ucode.c
iwl-agn.c Merge branch 'wireless-next-2.6' of git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-2.6 2011-04-04 16:10:36 -04:00
iwl-agn.h iwlwifi: add RATE_MCS_RATE_MSK 2011-03-25 06:58:06 -07:00
iwl-commands.h iwlwifi: set default aggregation frame limit to 63 2011-03-25 06:58:15 -07:00
iwl-core.c
iwl-core.h iwlagn: remove deprecated module parameters 2011-03-25 06:58:54 -07:00
iwl-csr.h iwlagn: remove reference to 3945 and 4965 2011-03-25 06:58:47 -07:00
iwl-debug.h
iwl-debugfs.c
iwl-dev.h iwlwifi: fix enqueue hcmd race conditions 2011-04-07 15:34:11 -04:00
iwl-devtrace.c
iwl-devtrace.h
iwl-eeprom.c iwlagn: remove reference to 3945 and 4965 2011-03-25 06:58:47 -07:00
iwl-eeprom.h
iwl-fh.h
iwl-hcmd.c
iwl-helpers.h
iwl-io.h
iwl-led.c
iwl-led.h
iwl-power.c
iwl-power.h
iwl-prph.h
iwl-rx.c
iwl-scan.c
iwl-spectrum.h
iwl-sta.c iwlagn: remove 3945 only station code 2011-03-25 06:58:39 -07:00
iwl-sta.h
iwl-tx.c iwlwifi: fix enqueue hcmd race conditions 2011-04-07 15:34:11 -04:00
Kconfig
Makefile