* [PATCH ] scsi: page warning: 'page' may be used uninitialized
@ 2020-09-24 0:19 john.p.donnelly
2020-10-02 18:01 ` Mike Christie
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: john.p.donnelly @ 2020-09-24 0:19 UTC (permalink / raw)
To: linux-kernel, linux-scsi
Cc: martin.petersen, john.p.donnelly, michael.christie, bstroesser
From: John Donnelly <john.p.donnelly@oracle.com>
corrects: drivers/target/target_core_user.c:688:6: warning: 'page' may be used
uninitialized
Fixes: 3c58f737231e ("scsi: target: tcmu: Optimize use of
flush_dcache_page")
To: linux-scsi@vger.kernel.org
Cc: Mike Christie <michael.christie@oracle.com>
Signed-off-by: John Donnelly <john.p.donnelly@oracle.com>
---
drivers/target/target_core_user.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/target/target_core_user.c b/drivers/target/target_core_user.c
index 9b7592350502..86b28117787e 100644
--- a/drivers/target/target_core_user.c
+++ b/drivers/target/target_core_user.c
@@ -681,7 +681,7 @@ static void scatter_data_area(struct tcmu_dev *udev,
void *from, *to = NULL;
size_t copy_bytes, to_offset, offset;
struct scatterlist *sg;
- struct page *page;
+ struct page *page = NULL;
for_each_sg(data_sg, sg, data_nents, i) {
int sg_remaining = sg->length;
--
2.27.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH ] scsi: page warning: 'page' may be used uninitialized
2020-09-24 0:19 [PATCH ] scsi: page warning: 'page' may be used uninitialized john.p.donnelly
@ 2020-10-02 18:01 ` Mike Christie
2020-10-02 18:08 ` John Donnelly
2020-10-03 1:23 ` Martin K. Petersen
2020-10-07 3:47 ` Martin K. Petersen
2 siblings, 1 reply; 5+ messages in thread
From: Mike Christie @ 2020-10-02 18:01 UTC (permalink / raw)
To: john.p.donnelly, linux-kernel, linux-scsi; +Cc: martin.petersen, bstroesser
On 9/23/20 7:19 PM, john.p.donnelly@oracle.com wrote:
> From: John Donnelly <john.p.donnelly@oracle.com>
>
> corrects: drivers/target/target_core_user.c:688:6: warning: 'page' may be used
> uninitialized
>
> Fixes: 3c58f737231e ("scsi: target: tcmu: Optimize use of
> flush_dcache_page")
>
> To: linux-scsi@vger.kernel.org
> Cc: Mike Christie <michael.christie@oracle.com>
> Signed-off-by: John Donnelly <john.p.donnelly@oracle.com>
> ---
> drivers/target/target_core_user.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/target/target_core_user.c b/drivers/target/target_core_user.c
> index 9b7592350502..86b28117787e 100644
> --- a/drivers/target/target_core_user.c
> +++ b/drivers/target/target_core_user.c
> @@ -681,7 +681,7 @@ static void scatter_data_area(struct tcmu_dev *udev,
> void *from, *to = NULL;
> size_t copy_bytes, to_offset, offset;
> struct scatterlist *sg;
> - struct page *page;
> + struct page *page = NULL;
>
> for_each_sg(data_sg, sg, data_nents, i) {
> int sg_remaining = sg->length;
>
Looks ok for now. In the next kernel we can do the more invasive approach and
add a new struct/helpers to make the code cleaner and fix it properly.
Acked-by: Mike Christie <michael.christie@oracle.com>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH ] scsi: page warning: 'page' may be used uninitialized
2020-10-02 18:01 ` Mike Christie
@ 2020-10-02 18:08 ` John Donnelly
0 siblings, 0 replies; 5+ messages in thread
From: John Donnelly @ 2020-10-02 18:08 UTC (permalink / raw)
To: Mike Christie; +Cc: linux-kernel, linux-scsi, martin.petersen, bstroesser
> On Oct 2, 2020, at 1:01 PM, Mike Christie <michael.christie@oracle.com> wrote:
>
> On 9/23/20 7:19 PM, john.p.donnelly@oracle.com wrote:
>> From: John Donnelly <john.p.donnelly@oracle.com>
>>
>> corrects: drivers/target/target_core_user.c:688:6: warning: 'page' may be used
>> uninitialized
>>
>> Fixes: 3c58f737231e ("scsi: target: tcmu: Optimize use of
>> flush_dcache_page")
>>
>> To: linux-scsi@vger.kernel.org
>> Cc: Mike Christie <michael.christie@oracle.com>
>> Signed-off-by: John Donnelly <john.p.donnelly@oracle.com>
>> ---
>> drivers/target/target_core_user.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/target/target_core_user.c b/drivers/target/target_core_user.c
>> index 9b7592350502..86b28117787e 100644
>> --- a/drivers/target/target_core_user.c
>> +++ b/drivers/target/target_core_user.c
>> @@ -681,7 +681,7 @@ static void scatter_data_area(struct tcmu_dev *udev,
>> void *from, *to = NULL;
>> size_t copy_bytes, to_offset, offset;
>> struct scatterlist *sg;
>> - struct page *page;
>> + struct page *page = NULL;
>>
>> for_each_sg(data_sg, sg, data_nents, i) {
>> int sg_remaining = sg->length;
>>
>
> Looks ok for now. In the next kernel we can do the more invasive approach and
> add a new struct/helpers to make the code cleaner and fix it properly.
>
> Acked-by: Mike Christie <michael.christie@oracle.com>
Hi
Thank you.
I am not always on the email dlists .. Please do the right thing .
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH ] scsi: page warning: 'page' may be used uninitialized
2020-09-24 0:19 [PATCH ] scsi: page warning: 'page' may be used uninitialized john.p.donnelly
2020-10-02 18:01 ` Mike Christie
@ 2020-10-03 1:23 ` Martin K. Petersen
2020-10-07 3:47 ` Martin K. Petersen
2 siblings, 0 replies; 5+ messages in thread
From: Martin K. Petersen @ 2020-10-03 1:23 UTC (permalink / raw)
To: john.p.donnelly
Cc: linux-kernel, linux-scsi, martin.petersen, michael.christie, bstroesser
John,
> corrects: drivers/target/target_core_user.c:688:6: warning: 'page' may be used
> uninitialized
Applied to 5.10/scsi-staging, thanks!
--
Martin K. Petersen Oracle Linux Engineering
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH ] scsi: page warning: 'page' may be used uninitialized
2020-09-24 0:19 [PATCH ] scsi: page warning: 'page' may be used uninitialized john.p.donnelly
2020-10-02 18:01 ` Mike Christie
2020-10-03 1:23 ` Martin K. Petersen
@ 2020-10-07 3:47 ` Martin K. Petersen
2 siblings, 0 replies; 5+ messages in thread
From: Martin K. Petersen @ 2020-10-07 3:47 UTC (permalink / raw)
To: john.p.donnelly, linux-kernel, linux-scsi
Cc: Martin K . Petersen, michael.christie, bstroesser
On Wed, 23 Sep 2020 17:19:20 -0700, john.p.donnelly@oracle.com wrote:
> corrects: drivers/target/target_core_user.c:688:6: warning: 'page' may be used
> uninitialized
>
> Fixes: 3c58f737231e ("scsi: target: tcmu: Optimize use of
> flush_dcache_page")
Applied to 5.10/scsi-queue, thanks!
[1/1] scsi: target: tcmu: Fix warning: 'page' may be used uninitialized
https://git.kernel.org/mkp/scsi/c/61741d8699e1
--
Martin K. Petersen Oracle Linux Engineering
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2020-10-07 3:48 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-24 0:19 [PATCH ] scsi: page warning: 'page' may be used uninitialized john.p.donnelly
2020-10-02 18:01 ` Mike Christie
2020-10-02 18:08 ` John Donnelly
2020-10-03 1:23 ` Martin K. Petersen
2020-10-07 3:47 ` Martin K. Petersen
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.