summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/scsi_lib.c
diff options
context:
space:
mode:
authorAndrew Morton <akpm@osdl.org>2007-02-06 01:39:03 +0100
committerJames Bottomley <jejb@mulgrave.il.steeleye.com>2007-02-08 00:29:36 +0100
commit22cfefb56b53103a99908ec63311e61c217eaffe (patch)
tree94f82761269ddd07f6925aaf9817e72bd0deaf61 /drivers/scsi/scsi_lib.c
parent[SCSI] Buslogic: local_irq_disable() is redundant after local_irq_save() (diff)
downloadlinux-22cfefb56b53103a99908ec63311e61c217eaffe.tar.xz
linux-22cfefb56b53103a99908ec63311e61c217eaffe.zip
[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: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/scsi/scsi_lib.c')
-rw-r--r--drivers/scsi/scsi_lib.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c
index 503f09c2f05f..0f9b6c275417 100644
--- a/drivers/scsi/scsi_lib.c
+++ b/drivers/scsi/scsi_lib.c
@@ -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;