Commit 7921a11c authored by David Vrabel's avatar David Vrabel

xen-scsifront: don't deadlock if the ring becomes full

scsifront_action_handler() will deadlock on host->host_lock, if the
ring is full and it has to wait for entries to become available.
Signed-off-by: default avatarDavid Vrabel <david.vrabel@citrix.com>
Reviewed-by: default avatarJuergen Gross <jgross@suse.com>
parent f955371c
...@@ -541,8 +541,9 @@ static int scsifront_action_handler(struct scsi_cmnd *sc, uint8_t act) ...@@ -541,8 +541,9 @@ static int scsifront_action_handler(struct scsi_cmnd *sc, uint8_t act)
if (!shadow) if (!shadow)
return FAILED; return FAILED;
for (;;) {
spin_lock_irq(host->host_lock); spin_lock_irq(host->host_lock);
for (;;) {
if (!RING_FULL(&info->ring)) { if (!RING_FULL(&info->ring)) {
ring_req = scsifront_command2ring(info, sc, shadow); ring_req = scsifront_command2ring(info, sc, shadow);
if (ring_req) if (ring_req)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment