Skip to content
Snippets Groups Projects
Commit e71f2087 authored by John Donnelly's avatar John Donnelly Committed by Yongqiang Liu
Browse files

scsi: target: tcmu: Fix warning: 'page' may be used uninitialized

mainline inclusion
from mainline-v5.10-rc1
commit 8c4e0f21
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I5SXLB
CVE: NA

--------------------------------

Corrects drivers/target/target_core_user.c:688:6: warning: 'page' may be
used uninitialized.

Link: https://lore.kernel.org/r/20200924001920.43594-1-john.p.donnelly@oracle.com


Fixes: 3c58f737 ("scsi: target: tcmu: Optimize use of flush_dcache_page")
Cc: Mike Christie <michael.christie@oracle.com>
Acked-by: default avatarMike Christie <michael.christie@oracle.com>
Signed-off-by: default avatarJohn Donnelly <john.p.donnelly@oracle.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: default avatarWenchao Hao <haowenchao@huawei.com>
Reviewed-by: default avatarlijinlin <lijinlin3@huawei.com>
Signed-off-by: default avatarYongqiang Liu <liuyongqiang13@huawei.com>
parent d0b7519e
No related branches found
No related tags found
No related merge requests found
...@@ -680,7 +680,7 @@ static void scatter_data_area(struct tcmu_dev *udev, ...@@ -680,7 +680,7 @@ static void scatter_data_area(struct tcmu_dev *udev,
void *from, *to = NULL; void *from, *to = NULL;
size_t copy_bytes, to_offset, offset; size_t copy_bytes, to_offset, offset;
struct scatterlist *sg; struct scatterlist *sg;
struct page *page; struct page *page = NULL;
for_each_sg(data_sg, sg, data_nents, i) { for_each_sg(data_sg, sg, data_nents, i) {
int sg_remaining = sg->length; int sg_remaining = sg->length;
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment