On Mon, Jun 27 2005, James Bottomley wrote: > On Mon, 2005-06-27 at 09:52 +0200, Jens Axboe wrote: > > This wont work at all, I'm afraid. You cannot atomically kmap() the > > buffer for queueing, and unmap it from interrupt context. The type > > probably isn't correct, and you are not guaranteed to be on the same > > CPU when doing the unmap. Thus you end up with corrupted maps and > > preemption counts. > > Actually, it's a lot simpler than that. We're generating the data for > the command, so all we do is send an equivalent command to the array (if > any) and then in the irq routine, kmap_atomic the buffer, copy the array > data into the buffer in the right order for the command then kunmap the > buffer again. This should work fine, I think. Yup, that would be ok, if that is what you did I misread where the mapping took place! But you still can't use KM_USER0 in irq context. -- Jens Axboe - : send the line "unsubscribe linux-scsi" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html