projects
/
platform
/
kernel
/
linux-rpi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f955371
)
xen-scsifront: don't deadlock if the ring becomes full
author
David Vrabel
<david.vrabel@citrix.com>
Thu, 11 Sep 2014 13:20:04 +0000
(14:20 +0100)
committer
David Vrabel
<david.vrabel@citrix.com>
Fri, 3 Oct 2014 11:34:40 +0000
(12:34 +0100)
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: David Vrabel <david.vrabel@citrix.com>
Reviewed-by: Juergen Gross <jgross@suse.com>
drivers/scsi/xen-scsifront.c
patch
|
blob
|
history
diff --git
a/drivers/scsi/xen-scsifront.c
b/drivers/scsi/xen-scsifront.c
index
7e88659
..
cc14c8d
100644
(file)
--- a/
drivers/scsi/xen-scsifront.c
+++ b/
drivers/scsi/xen-scsifront.c
@@
-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)