Skip to content

Commit

Permalink
[SCSI] scsi_kmap_atomic_sg(): check that local irqs are disabled
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Andrew Morton authored and James Bottomley committed Feb 7, 2007
1 parent 4474643 commit 22cfefb
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/scsi/scsi_lib.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 22cfefb

Please sign in to comment.