Re: [RESEND PATCH] scsi: fix ata_port_wait_eh() hang caused by missing to wake up eh thread

2016-10-09 Thread Christoph Hellwig
On Sun, Oct 09, 2016 at 10:21:45PM +0800, Wei Fang wrote: > ->host_eh_schedule and ->shost_state may be accessed simultaneously as > below: But we can't simply take shost_lock in every completion handler, as that would kill peformance. >From a quick look the most sensible options seems to be to r

[RESEND PATCH] scsi: fix ata_port_wait_eh() hang caused by missing to wake up eh thread

2016-10-09 Thread Wei Fang
->host_eh_schedule and ->shost_state may be accessed simultaneously as below: 1.In ata port probe path: ata_std_sched_eh() scsi_schedule_eh() ... spin_lock_irqsave(shost->host_lock, flags); if (scsi_host_set_state(shost, SHOST_RECOVERY) == 0

[PATCH] scsi: fix ata_port_wait_eh() hang caused by missing to wake up eh thread

2016-09-30 Thread Wei Fang
->host_eh_schedule and ->shost_state may be accessed simultaneously as bellow: 1.In ata port probe path: ata_std_sched_eh() scsi_schedule_eh() ... spin_lock_irqsave(shost->host_lock, flags); if (scsi_host_set_state(shost, SHOST_RECOVERY) == 0