Re: [bug] ata subsystem related crash with latest -git

Linus Torvalds
2007-10-18T04:54:36Z

On Thu, 18 Oct 2007, Jeff Garzik wrote:
>
> Is this a sata_mv box? If so, could you try this patch?

That could explain it: if the SG allocation is simply too small, the
scatter-gather code will run off the end of the SG list, and encounter
random uninitialized entries, and if any of those have the low bit set,
they will be considered to be "link" entries, and the SG list goes wild.

That SG code is really pretty fragile. I don't see it *ever* checking that
the SG allocation is large enough when it fills it in. And these things
take the sizes from different places (ie "cmd->use_sg" bs
"req->nr_phys_segments" vs God knows what else..)

Linus