Skip to content

Commit

Permalink
BUG_ON on kernel misbehavior on A100U2W driver
Browse files Browse the repository at this point in the history
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 <[email protected]>
Acked-by: James Bottomley <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
Mikulas Patocka authored and torvalds committed Jul 15, 2008
1 parent 56d387e commit a5db334
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/scsi/a100u2w.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit a5db334

Please sign in to comment.