diff options
author | Santosh Nayak <santoshprasadnayak@gmail.com> | 2012-02-26 13:35:03 (GMT) |
---|---|---|
committer | James Bottomley <JBottomley@Parallels.com> | 2012-02-29 22:52:59 (GMT) |
commit | 50ec5babd3b9da274ac3e0d5ca0c4772e3c7bc8d (patch) | |
tree | 8f975cfed3e6bd9b1e15dd862bf8f7ad9dd9387d /drivers/md/dm-io.c | |
parent | bdaefbf580cd200ae3230b6aacd1f4f2dadb18e3 (diff) | |
download | linux-fsl-qoriq-50ec5babd3b9da274ac3e0d5ca0c4772e3c7bc8d.tar.xz |
[SCSI] pm8001: Fix possible racing condition.
There is a possble racing scenario.
'process_oq' is called by two routines, as shown below.
pm8001_8001_dispatch = {
.......
.isr = pm8001_chip_isr --> process_oq,// A
.isr_process_oq = process_oq, // B
.....
}
process_oq() --> process_one_iomb() --> mpi_sata_completion()
In 'mpi_sata_completion', "pm8001_ha->lock" is first released.
It means lock is taken before, which is true for
the context A, as 'pm8001_ha->lock' is taken in 'pm8001_chip_isr()'
But for context B there is no lock taken before and pm8001_ha->lock
is unlocked in 'mpi_sata_completion()'. This may unlock the lock
taken in context A. Possible racing ??
If 'pm8001_ha->lock' is taken in 'process_oq()' instead of
'pm8001_chip_isr' then the above issue can be avoided.
Signed-off-by: Santosh Nayak <santoshprasadnayak@gmail.com>
Acked-by: Jack Wang <jack_wang@usish.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'drivers/md/dm-io.c')
0 files changed, 0 insertions, 0 deletions