Commit a5db3341 authored by Mikulas Patocka's avatar Mikulas Patocka Committed by Linus Torvalds

BUG_ON on kernel misbehavior on A100U2W driver

With broken Sparc64 IOMMU accounting, the kernel submits larger requests
then allowed.  Better to crash on BUG than corrupt memory.
Signed-off-by: default avatarMikulas Patocka <mpatocka@redhat.com>
Acked-by: default avatarJames Bottomley <James.Bottomley@HansenPartnership.com>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 56d387ec
...@@ -866,6 +866,7 @@ static void inia100_build_scb(struct orc_host * host, struct orc_scb * scb, stru ...@@ -866,6 +866,7 @@ static void inia100_build_scb(struct orc_host * host, struct orc_scb * scb, stru
count_sg = scsi_dma_map(cmd); count_sg = scsi_dma_map(cmd);
BUG_ON(count_sg < 0); BUG_ON(count_sg < 0);
BUG_ON(count_sg > TOTAL_SG_ENTRY);
/* Build the scatter gather lists */ /* Build the scatter gather lists */
if (count_sg) { if (count_sg) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment