Hello, Vladimir. On Tue, Nov 29, 2016 at 08:54:11PM +0200, Vladimir Zapolskiy wrote: > tracing on the board shows a race between driver initialization and > deinitialization, when async_port_probe() is scheduled after driver > removal, this causes the reported problem. > > Since it is a race, it should be possible to fuzz the kernel by > introducing a delay (e.g. in ata_port_probe()) to get enough time > to reproduce the problem reliably and to verify a fix. > > imx_ahci_probe() > ahci_platform_init_host() > ata_host_alloc_pinfo() > ata_host_alloc() > ata_port_alloc() ---> sets ATA_PFLAG_INITIALIZING flag > ata_link_init() > .... > ahci_host_activate() > ata_host_activate() > ata_host_start() > ata_eh_freeze_port() > ata_port_desc() > ata_host_register() ---> schedules async_port_probe() > .... > > *** at this point the driver probe is completed, thus it can be removed *** Not really. Is this from the unloading test config? Control doesn't get passed to userland until async probings are flushed, so this shouldn't normally be possible. Thanks. -- tejun -- To unsubscribe from this list: send the line "unsubscribe linux-ide" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html