Re: 2.6.30-rc1: invalid opcode with call trace

From: Cornelia Huck
Date: Thu Apr 09 2009 - 10:45:33 EST


On Wed, 8 Apr 2009 18:15:21 +0200,
Vegard Nossum <vegard.nossum@xxxxxxxxx> wrote:

> The problem is that you have two async port probes:
>
> [ 24.177306] calling 1_async_port_probe+0x0/0xaa @ 2841
> [ 24.177825] calling 2_async_port_probe+0x0/0xaa @ 2842
>
> of which only the first completes, because the first async call itself
> tries to flush the async list while holding a lock (the
> &shost->scan_mutex in __scsi_add_device), causing deadlock.
>
> In short, I don't think we should call async_synchronize_full() from
> scsi_complete_async_scans() at all. I'm including a more detailed
> description/justification in the patch (attached).

Not that I understand much about the scsi code, but there seem to be
two 'async' processes going on:

- async scanning of the Scsi_Host (which scsi_complete_async_scans()
waits for)
- async execution of a part of scsi_probe (which the
async_synchronize_full() waits for)

Considering the async scanning complete only when all probes have
finished seems sensible, so the fix doesn't look correct to me.

Would it perhaps make sense to introduce a per-Scsi_Host running list
so that do_scsi_scan_host() could use async_synchronize_domain() to
wait for all async probes for the host to finish? Or am I
misunderstanding the aim of the scsi code?
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/