]> git.baikalelectronics.ru Git - kernel.git/commit
tcmu: Fix possible to/from address overflow when doing the memcpy
authorXiubo Li <lixiubo@cmss.chinamobile.com>
Wed, 12 Jul 2017 07:51:17 +0000 (15:51 +0800)
committerNicholas Bellinger <nab@linux-iscsi.org>
Sun, 30 Jul 2017 22:12:32 +0000 (15:12 -0700)
commit2ac66c22916aaf875d5d52e273a7ba121d37a6a1
tree935be87483fc8dcd9029bae5cc61f322fe505121
parent14d22ef8941bd2289e511668715c5e0ef97018bd
tcmu: Fix possible to/from address overflow when doing the memcpy

For most case the sg->length equals to PAGE_SIZE, so this bug won't
be triggered. Otherwise this will crash the kernel, for example when
all segments' sg->length equal to 1K.

Signed-off-by: Xiubo Li <lixiubo@cmss.chinamobile.com>
Reviewed-by: Mike Christie <mchristi@redhat.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
drivers/target/target_core_user.c