summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorMikulas Patocka <mpatocka@redhat.com>2008-07-15 21:18:38 (GMT)
committerLinus Torvalds <torvalds@linux-foundation.org>2008-07-15 21:30:56 (GMT)
commita5db33411ae762e597bfcde6bb9d0c8c2ea9c0eb (patch)
treefca5929eddc432092f0c444ffc672058effb78b0 /drivers
parent56d387ec210049be2fdb0fe26ba6d6de1b3c1b15 (diff)
downloadlinux-fsl-qoriq-a5db33411ae762e597bfcde6bb9d0c8c2ea9c0eb.tar.xz
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: Mikulas Patocka <mpatocka@redhat.com> Acked-by: James Bottomley <James.Bottomley@HansenPartnership.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/scsi/a100u2w.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/scsi/a100u2w.c b/drivers/scsi/a100u2w.c
index 1e8bdd4..f5051f4 100644
--- a/drivers/scsi/a100u2w.c
+++ b/drivers/scsi/a100u2w.c
@@ -866,6 +866,7 @@ static void inia100_build_scb(struct orc_host * host, struct orc_scb * scb, stru
count_sg = scsi_dma_map(cmd);
BUG_ON(count_sg < 0);
+ BUG_ON(count_sg > TOTAL_SG_ENTRY);
/* Build the scatter gather lists */
if (count_sg) {