Subject: CVS commit: src/sys/dev/scsipi
To: None <source-changes@NetBSD.org>
From: Izumi Tsutsui <tsutsui@netbsd.org>
List: source-changes
Date: 08/03/2007 13:56:38
Module Name:	src
Committed By:	tsutsui
Date:		Fri Aug  3 13:56:38 UTC 2007

Modified Files:
	src/sys/dev/scsipi: sd.c

Log Message:
Don't allocate data buffer on stack in sd_read_capacity().

If data buffer is allocated on stack at the end of CPU cacheline,
the same cacheline region might be accessed via kernel stack even
after bus_dmamap_sync(9) against the data buffer in lower scsi drivers
so that read data via DMA could be lost.

Fixes occasional readdisklabel(9) failure at boot on ews4800mips
with osiop(4) driver and 128byte cacheline.

XXX: Other functions/drivers might have the similar problem.


To generate a diff of this commit:
cvs rdiff -r1.264 -r1.265 src/sys/dev/scsipi/sd.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.