]> err.no Git - linux-2.6/commitdiff
[SCSI] scsi_kmap_atomic_sg(): check that local irqs are disabled
authorAndrew Morton <akpm@osdl.org>
Tue, 6 Feb 2007 00:39:03 +0000 (16:39 -0800)
committerJames Bottomley <jejb@mulgrave.il.steeleye.com>
Wed, 7 Feb 2007 23:29:36 +0000 (18:29 -0500)
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>
drivers/scsi/scsi_lib.c

index 503f09c2f05fb64b19d254cbb82bcf2632750590..0f9b6c2754177e44026b925440f52cfd85de73ac 100644 (file)
@@ -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;