提交 22cfefb5 编写于 作者: A Andrew Morton 提交者: James Bottomley

[SCSI] scsi_kmap_atomic_sg(): check that local irqs are disabled

The KM_BIO_SRC_IRQ kmap slot must be taken with local irqs disabled.  Add a
check into scsi for this.

Cc: James Bottomley <James.Bottomley@steeleye.com>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NJames Bottomley <James.Bottomley@SteelEye.com>
上级 44746438
......@@ -2250,6 +2250,8 @@ void *scsi_kmap_atomic_sg(struct scatterlist *sg, int sg_count,
size_t sg_len = 0, len_complete = 0;
struct page *page;
WARN_ON(!irqs_disabled());
for (i = 0; i < sg_count; i++) {
len_complete = sg_len; /* Complete sg-entries */
sg_len += sg[i].length;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册