]> git.baikalelectronics.ru Git - kernel.git/commit
[SCSI] scsi_debug: fix invalid address passed to kunmap_atomic()
authorAkinobu Mita <akinobu.mita@gmail.com>
Sat, 29 Jun 2013 08:59:14 +0000 (17:59 +0900)
committerJames Bottomley <JBottomley@Parallels.com>
Tue, 9 Jul 2013 08:17:50 +0000 (09:17 +0100)
commit0d46db649d86f1bd01edc81a7d2e05427eb2944f
tree1563e4e42d9c51e6b33e0c4bf5d171dc35e061ad
parent2e307d92bd25d6dacf9931efe8e194290f1ee062
[SCSI] scsi_debug: fix invalid address passed to kunmap_atomic()

In the function prot_verify_write(), the kmap address 'daddr' is
incremented in the loop for each data page.  Finally 'daddr' reaches
the next page boundary in the end of the loop, and the invalid address
is passed to kunmap_atomic().

Fix the issue by not incrementing 'daddr' in the loop and offsetting it
by the loop counter on demand.

Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Acked-by: Douglas Gilbert <dgilbert@interlog.com>
Acked-by: "Martin K. Petersen" <martin.petersen@oracle.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
drivers/scsi/scsi_debug.c