]> git.baikalelectronics.ru Git - kernel.git/commit
target: Fix inconsistent address passed to kunmap_atomic() in sbc_dif_copy_prot()
authorAkinobu Mita <akinobu.mita@gmail.com>
Fri, 1 May 2015 06:23:48 +0000 (15:23 +0900)
committerNicholas Bellinger <nab@linux-iscsi.org>
Sun, 31 May 2015 05:42:23 +0000 (22:42 -0700)
commit8d2808206c190d55d5d1e9187a0f06014d1c633e
tree0ce8ebfdf5e3d95b2a6a2a9145964a97f31f9440
parent75dd68b4e0bbcb8a11f71cec399063366c2798ea
target: Fix inconsistent address passed to kunmap_atomic() in sbc_dif_copy_prot()

In sbc_dif_copy_prot(), the addresses passed to kunmap_atomic() are
inconsistent with the addresses which are mapped by kmap_atomic().
That could be problematic if an SG element has its length larger than
PAGE_SIZE as kunmap_atomic() will attempt to unmap different page.

Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Cc: Nicholas Bellinger <nab@linux-iscsi.org>
Cc: Sagi Grimberg <sagig@mellanox.com>
Cc: "Martin K. Petersen" <martin.petersen@oracle.com>
Cc: Christoph Hellwig <hch@lst.de>
Cc: "James E.J. Bottomley" <James.Bottomley@HansenPartnership.com>
Cc: target-devel@vger.kernel.org
Cc: linux-scsi@vger.kernel.org
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
drivers/target/target_core_sbc.c