* [PATCH 12/13] ide: add missing validity checks for identify words 62 and 63
@ 2007-03-10 21:11 Bartlomiej Zolnierkiewicz
0 siblings, 0 replies; only message in thread
From: Bartlomiej Zolnierkiewicz @ 2007-03-10 21:11 UTC (permalink / raw)
To: linux-ide
[PATCH] ide: add missing validity checks for identify words 62 and 63
Check validity of identify words 62 and 63 before using them in
ide_get_mode_mask().
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
---
drivers/ide/ide-dma.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
Index: b/drivers/ide/ide-dma.c
===================================================================
--- a/drivers/ide/ide-dma.c
+++ b/drivers/ide/ide-dma.c
@@ -731,10 +731,12 @@ static unsigned int ide_get_mode_mask(id
mask &= 0x07;
break;
case XFER_MW_DMA_0:
- mask = id->dma_mword & hwif->mwdma_mask;
+ if (id->field_valid & 2)
+ mask = id->dma_mword & hwif->mwdma_mask;
break;
case XFER_SW_DMA_0:
- mask = id->dma_1word & hwif->swdma_mask;
+ if (id->field_valid & 2)
+ mask = id->dma_1word & hwif->swdma_mask;
break;
default:
BUG();
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2007-03-10 21:09 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-03-10 21:11 [PATCH 12/13] ide: add missing validity checks for identify words 62 and 63 Bartlomiej Zolnierkiewicz
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).