浏览代码

[SCSI] fix locking in host use of blk_plug_device()

scsi_lib.c:scsi_host_queue_ready() plugs the device with incorrect
locking.  It should actually have the queue lock held, but it's
holding the host lock.  Fix this by eliminating the call.  The host
ready has no need to plug the queue because if it returns 0 in
scsi_request_function control transfers to not_ready which acquires
the queue lock and plugs the device if its at zero depth.

Reported-by: Elias Oltmanns <eo@nebensachen.de>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
James Bottomley 17 年之前
父节点
当前提交
2476b4d042
共有 1 个文件被更改,包括 0 次插入1 次删除
  1. 0 1
      drivers/scsi/scsi_lib.c

+ 0 - 1
drivers/scsi/scsi_lib.c

@@ -1328,7 +1328,6 @@ static inline int scsi_host_queue_ready(struct request_queue *q,
 				printk("scsi%d unblocking host at zero depth\n",
 				printk("scsi%d unblocking host at zero depth\n",
 					shost->host_no));
 					shost->host_no));
 		} else {
 		} else {
-			blk_plug_device(q);
 			return 0;
 			return 0;
 		}
 		}
 	}
 	}