diff options
author | Ira Snyder <iws@ovro.caltech.edu> | 2012-01-26 15:00:14 +0400 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2012-02-27 04:33:59 +0400 |
commit | 6c15d7afbb2f9e2d3114b513306dae736b56f535 (patch) | |
tree | 17ad7aa4544ad1d83b50eb4929f77b7793b5f0f4 /fs/9p/vfs_dentry.c | |
parent | 75ff85a81680e5779383aa6210a4f89ed76e40ec (diff) | |
download | linux-6c15d7afbb2f9e2d3114b513306dae736b56f535.tar.xz |
carma-fpga: fix race between data dumping and DMA callback
When the system is under heavy load, we occasionally saw a problem where
the system would get a legitimate interrupt when they should be
disabled.
This was caused by the data_dma_cb() DMA callback unconditionally
re-enabling FPGA interrupts even when data dumping is disabled. When
data dumping was re-enabled, the irq handler would fire while a DMA was
in progress. The "BUG_ON(priv->inflight != NULL);" during the second
invocation of the DMA callback caused the system to crash.
To fix the issue, the priv->enabled boolean is moved under the
protection of the priv->lock spinlock. The DMA callback checks the
boolean to know whether to re-enable FPGA interrupts before it returns.
Now that it is fixed, the driver keeps FPGA interrupts disabled when it
expects that they are disabled, fixing the bug.
Signed-off-by: Ira W. Snyder <iws@ovro.caltech.edu>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'fs/9p/vfs_dentry.c')
0 files changed, 0 insertions, 0 deletions