]> git.baikalelectronics.ru Git - kernel.git/commit
firewire: fw-sbp2: add a boundary check
authorStefan Richter <stefanr@s5r6.in-berlin.de>
Sun, 1 Jul 2007 11:56:03 +0000 (13:56 +0200)
committerStefan Richter <stefanr@s5r6.in-berlin.de>
Mon, 9 Jul 2007 22:07:47 +0000 (00:07 +0200)
commit7178a135e5eb324d66135f39f88cf28f995513c4
tree63313482ee19fffea5900bacf52c1c660528f72a
parentd2af3a2e5ee70f4652ae7921d7b13b5691c6bb31
firewire: fw-sbp2: add a boundary check

Add rudimentary check for the case that the page table overflows due to
merging of s/g elements by the IOMMU.  This would have lead to
overwriting of arbitrary memory.

After this change I expect that an offending command will be
unsuccessfully retried until the scsi_device is taken offline by SCSI
core.  It's a border case and not worth to implement a recovery
strategy.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Acked-by: Kristian Høgsberg <krh@redhat.com>
drivers/firewire/fw-sbp2.c