diff options
| author | Stanislaw Gruszka <sgruszka@redhat.com> | 2011-04-28 11:51:31 +0200 |
|---|---|---|
| committer | John W. Linville <linville@tuxdriver.com> | 2011-04-29 15:36:14 -0400 |
| commit | 81e63263aa3c5bfa64aa3206f4be3e59afc1c183 (patch) | |
| tree | 6574c26f54772f16231aac2b329134c63a1a7376 /fs/jbd2/commit.c | |
| parent | 93fd74e3d5471c4c91a239599a88fa7e52686e71 (diff) | |
| download | olio-linux-3.10-81e63263aa3c5bfa64aa3206f4be3e59afc1c183.tar.xz olio-linux-3.10-81e63263aa3c5bfa64aa3206f4be3e59afc1c183.zip | |
iwlegacy: 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.
Do not change callback, I did (and fixed) that mistake in iwlagn.
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'fs/jbd2/commit.c')
0 files changed, 0 insertions, 0 deletions