Re: [PATCH 1/2] Ensure that the SCSI error handler gets woken up

2017-12-01 Thread Bart Van Assche
On Fri, 2017-12-01 at 11:42 +0300, Pavel Tikhomirov wrote: > On 12/01/2017 01:44 AM, Bart Van Assche wrote: > > + if (shost_state != shost->shost_state) { > > + spin_unlock_irqrestore(shost->host_lock, flags); > > + synchronize_rcu(); > > We can come here from interrupt

Re: [PATCH 1/2] Ensure that the SCSI error handler gets woken up

2017-12-01 Thread Bart Van Assche
On Fri, 2017-12-01 at 09:45 +0100, Johannes Thumshirn wrote: > Bart Van Assche writes: > [...] > > > + if (shost_state != shost->shost_state) { > > + spin_unlock_irqrestore(shost->host_lock, flags); > > + synchronize_rcu(); > > +

Re: [PATCH 1/2] Ensure that the SCSI error handler gets woken up

2017-12-01 Thread Johannes Thumshirn
Hi Bart, Bart Van Assche writes: [...] > + if (shost_state != shost->shost_state) { > + spin_unlock_irqrestore(shost->host_lock, flags); > + synchronize_rcu(); > + spin_lock_irqsave(shost->host_lock, flags); > + } Plese

Re: [PATCH 1/2] Ensure that the SCSI error handler gets woken up

2017-12-01 Thread Pavel Tikhomirov
On 12/01/2017 01:44 AM, Bart Van Assche wrote: If scsi_eh_scmd_add() is called concurrently with scsi_host_queue_ready() while shost->host_blocked > 0 then it can happen that neither function wakes up the SCSI error handler. Fix this by making every function that decreases the host_busy