提交 7921a11c 编写于 作者: D 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: NDavid Vrabel <david.vrabel@citrix.com>
Reviewed-by: NJuergen Gross <jgross@suse.com>
上级 f955371c
......@@ -541,8 +541,9 @@ static int scsifront_action_handler(struct scsi_cmnd *sc, uint8_t act)
if (!shadow)
return FAILED;
spin_lock_irq(host->host_lock);
for (;;) {
spin_lock_irq(host->host_lock);
if (!RING_FULL(&info->ring)) {
ring_req = scsifront_command2ring(info, sc, shadow);
if (ring_req)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册