diff options
author | Tejun Heo <htejun@gmail.com> | 2008-01-26 14:13:10 -0500 |
---|---|---|
committer | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2008-01-26 14:13:10 -0500 |
commit | 35cf2b94d0ecb7034cfa05dd725721538bbb83fc (patch) | |
tree | 6c3681f06b078626aeeb8de1e28bbdd458f95c70 /include/linux/ide.h | |
parent | 63c4467805c9b23231d8bc9b61305b2013f9fea2 (diff) |
ide: fix ->io_32bit race in ide_taskfile_ioctl()
In ide_taskfile_ioctl(), there was a race condition involving
drive->io_32bit. It was cleared and restored during ioctl
requests but there was no synchronization with other requests.
So, other requests could execute with the altered ->io_32bit
setting or updated drive->io_32bit could be overwritten by
ide_taskfile_ioctl().
This patch adds IDE_TFLAG_IO_16BIT flag to indicate to
ide_pio_datablock() that 16-bit I/O is needed regardless of
drive->io_32bit settting.
Bart:
- ported it over recent IDE changes
Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'include/linux/ide.h')
-rw-r--r-- | include/linux/ide.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/ide.h b/include/linux/ide.h index f94cf036bd95..c1a8b8bb93ab 100644 --- a/include/linux/ide.h +++ b/include/linux/ide.h | |||
@@ -931,6 +931,8 @@ enum { | |||
931 | IDE_TFLAG_IN_TF = IDE_TFLAG_IN_NSECT | | 931 | IDE_TFLAG_IN_TF = IDE_TFLAG_IN_NSECT | |
932 | IDE_TFLAG_IN_LBA, | 932 | IDE_TFLAG_IN_LBA, |
933 | IDE_TFLAG_IN_DEVICE = (1 << 29), | 933 | IDE_TFLAG_IN_DEVICE = (1 << 29), |
934 | /* force 16-bit I/O operations */ | ||
935 | IDE_TFLAG_IO_16BIT = (1 << 30), | ||
934 | }; | 936 | }; |
935 | 937 | ||
936 | struct ide_taskfile { | 938 | struct ide_taskfile { |