summaryrefslogtreecommitdiffstats
path: root/drivers/char/bsr.c
diff options
context:
space:
mode:
authorAkinobu Mita <akinobu.mita@gmail.com>2015-04-13 23:21:56 +0900
committerNicholas Bellinger <nab@linux-iscsi.org>2015-04-15 22:47:23 -0700
commit38da0f49e8aa1649af397d53f88e163d0e60c058 (patch)
treef1167920d1805849409cc9d71805b12c6cb560ea /drivers/char/bsr.c
parentdc0fafdab88b98581728a574885d0e4d9c6d0640 (diff)
downloadlinux-38da0f49e8aa1649af397d53f88e163d0e60c058.tar.gz
linux-38da0f49e8aa1649af397d53f88e163d0e60c058.tar.bz2
linux-38da0f49e8aa1649af397d53f88e163d0e60c058.zip
target/file: Fix BUG() when CONFIG_DEBUG_SG=y and DIF protection enabled
When CONFIG_DEBUG_SG=y and DIF protection support enabled, kernel BUG()s are triggered due to the following two issues: 1) prot_sg is not initialized by sg_init_table(). When CONFIG_DEBUG_SG=y, scatterlist helpers check sg entry has a correct magic value. 2) vmalloc'ed buffer is passed to sg_set_buf(). sg_set_buf() uses virt_to_page() to convert virtual address to struct page, but it doesn't work with vmalloc address. vmalloc_to_page() should be used instead. As prot_buf isn't usually too large, so fix it by allocating prot_buf by kmalloc instead of vmalloc. Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com> 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: <stable@vger.kernel.org> # v3.14+ Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Diffstat (limited to 'drivers/char/bsr.c')
0 files changed, 0 insertions, 0 deletions